Skip to content

[automated] Merge branch 'release/3.0' => 'master' #13182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
39aa19a
Update dependencies from https://github.com/aspnet/AspNetCore-Tooling…
Aug 14, 2019
24a8a21
Update dependencies from https://github.com/aspnet/EntityFrameworkCor…
Aug 14, 2019
b8996c0
Update dependencies from https://github.com/aspnet/EntityFrameworkCor…
Aug 14, 2019
221dbeb
Update dependencies from https://github.com/aspnet/AspNetCore-Tooling…
Aug 15, 2019
122cb4c
Update dependencies from https://github.com/aspnet/EntityFrameworkCor…
Aug 15, 2019
02fd9a9
Update dependencies from https://github.com/aspnet/EntityFrameworkCor…
Aug 15, 2019
98c8988
React to JSRuntime changes
pranavkm Aug 15, 2019
8469877
Update dependencies from https://github.com/aspnet/AspNetCore-Tooling…
dotnet-maestro[bot] Aug 15, 2019
1200369
Update dependencies from https://github.com/aspnet/EntityFrameworkCor…
dotnet-maestro[bot] Aug 15, 2019
c2a95e4
Dependency coherency updates
dotnet-maestro[bot] Aug 15, 2019
829f893
React to extensions changes
jkotalik Aug 15, 2019
b79e9aa
refs
jkotalik Aug 15, 2019
3e08d45
fix xunit namespace
jkotalik Aug 16, 2019
9d11d6f
Update dependencies from https://github.com/aspnet/AspNetCore-Tooling…
dotnet-maestro[bot] Aug 16, 2019
a982704
Update dependencies from https://github.com/aspnet/EntityFrameworkCor…
dotnet-maestro[bot] Aug 16, 2019
7f05415
Move public rendering types to .RenderTree
rynowak Aug 14, 2019
029e455
Remove ref:suppressField
pranavkm Aug 16, 2019
81e1583
Update dependencies from https://github.com/aspnet/AspNetCore-Tooling…
dotnet-maestro[bot] Aug 16, 2019
4493d07
Update dependencies from https://github.com/aspnet/EntityFrameworkCor…
dotnet-maestro[bot] Aug 16, 2019
203caa0
React to more changes
pranavkm Aug 16, 2019
3b51b55
Create CircuitSecret
rynowak Aug 15, 2019
aafb081
Rename DOM types and change namespace
rynowak Aug 14, 2019
895dfb4
Fixup template
pranavkm Aug 16, 2019
c0d5248
Refine service reference warnings and errors
dougbu Aug 14, 2019
5bc79e8
Ignore overriden properties in component parameters (#13198)
pranavkm Aug 17, 2019
96d612c
Update SDK to preview 8
Aug 16, 2019
04b1adb
Move service reference projects into Tools directory (#13185)
dougbu Aug 17, 2019
fc0c26c
Remove site-extension workarounds (#13044)
Aug 17, 2019
4d0c03f
Fix build race (#13197)
BrennanConroy Aug 17, 2019
8857746
Merge pull request #13112 from aspnet/darc-release/3.0-9048d89c-e829-…
pranavkm Aug 17, 2019
9e53ea1
[release/3.0] Update dependencies from 3 repositories (#13205)
dotnet-maestro[bot] Aug 17, 2019
98d492b
Merge branch 'master' into merge/release/3.0-to-master
dougbu Aug 17, 2019
e3137f5
Fix merge conflict
wtgodbe Aug 28, 2019
f87f842
Update dependencies from AspNetCore-Tooling
wtgodbe Aug 28, 2019
c22b4b9
Update dependencies from EntityFrameworkCore
wtgodbe Aug 28, 2019
d9ba9b6
Update dependencies from all sources
wtgodbe Aug 28, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions eng/ProjectReferences.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<ProjectReferenceProvider Include="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" ProjectPath="$(RepoRoot)src\Identity\ApiAuthorization.IdentityServer\src\Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Identity.Specification.Tests" ProjectPath="$(RepoRoot)src\Identity\Specification.Tests\src\Microsoft.AspNetCore.Identity.Specification.Tests.csproj" />
<ProjectReferenceProvider Include="Microsoft.Web.Xdt.Extensions" ProjectPath="$(RepoRoot)src\SiteExtensions\Microsoft.Web.Xdt.Extensions\src\Microsoft.Web.Xdt.Extensions.csproj" />
<ProjectReferenceProvider Include="dotnet-getdocument" ProjectPath="$(RepoRoot)src\Tools\dotnet-getdocument\src\dotnet-getdocument.csproj" />
<ProjectReferenceProvider Include="Microsoft.Extensions.ApiDescription.Client" ProjectPath="$(RepoRoot)src\Tools\Extensions.ApiDescription.Client\src\Microsoft.Extensions.ApiDescription.Client.csproj" />
<ProjectReferenceProvider Include="Microsoft.Extensions.ApiDescription.Server" ProjectPath="$(RepoRoot)src\Tools\Extensions.ApiDescription.Server\src\Microsoft.Extensions.ApiDescription.Server.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.DeveloperCertificates.XPlat" ProjectPath="$(RepoRoot)src\Tools\FirstRunCertGenerator\src\Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj" />
<ProjectReferenceProvider Include="dotnet-getdocument" ProjectPath="$(RepoRoot)src\Mvc\dotnet-getdocument\src\dotnet-getdocument.csproj" />
<ProjectReferenceProvider Include="Microsoft.Extensions.ApiDescription.Client" ProjectPath="$(RepoRoot)src\Mvc\Extensions.ApiDescription.Client\src\Microsoft.Extensions.ApiDescription.Client.csproj" />
<ProjectReferenceProvider Include="Microsoft.Extensions.ApiDescription.Server" ProjectPath="$(RepoRoot)src\Mvc\Extensions.ApiDescription.Server\src\Microsoft.Extensions.ApiDescription.Server.csproj" />
<ProjectReferenceProvider Include="GetDocument.Insider" ProjectPath="$(RepoRoot)src\Mvc\GetDocumentInsider\src\GetDocumentInsider.csproj" />
<ProjectReferenceProvider Include="GetDocument.Insider" ProjectPath="$(RepoRoot)src\Tools\GetDocumentInsider\src\GetDocumentInsider.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.SignalR.Specification.Tests" ProjectPath="$(RepoRoot)src\SignalR\server\Specification.Tests\src\Microsoft.AspNetCore.SignalR.Specification.Tests.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.Build" ProjectPath="$(RepoRoot)src\Components\Blazor\Build\src\Microsoft.AspNetCore.Blazor.Build.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore" ProjectPath="$(RepoRoot)src\DefaultBuilder\src\Microsoft.AspNetCore.csproj" RefProjectPath="$(RepoRoot)src\DefaultBuilder\ref\Microsoft.AspNetCore.csproj" />
Expand Down
401 changes: 201 additions & 200 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

200 changes: 100 additions & 100 deletions eng/Versions.props

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/Analyzers/Analyzers/test/AnalyzerTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Analyzer.Testing;
using Microsoft.AspNetCore.Testing;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.CodeAnalysis;

namespace Microsoft.AspNetCore.Analyzers
Expand Down
1 change: 0 additions & 1 deletion src/Components/Analyzers/test/AnalyzerTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Analyzer.Testing;
using Microsoft.AspNetCore.Testing;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.CodeAnalysis;

namespace Microsoft.AspNetCore.Components.Analyzers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace Microsoft.AspNetCore.Blazor.Rendering
public static partial class WebAssemblyEventDispatcher
{
[Microsoft.JSInterop.JSInvokableAttribute("DispatchEvent")]
public static System.Threading.Tasks.Task DispatchEvent(Microsoft.AspNetCore.Components.Web.WebEventDescriptor eventDescriptor, string eventArgsJson) { throw null; }
public static System.Threading.Tasks.Task DispatchEvent(Microsoft.AspNetCore.Components.RenderTree.WebEventDescriptor eventDescriptor, string eventArgsJson) { throw null; }
}
}
namespace Microsoft.AspNetCore.Components.Builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public Task StartAsync(CancellationToken cancellationToken = default)
// this happens in the browser it will be a direct call from Mono. We effectively needs to set the
// JSRuntime in the 'root' execution context which implies that we want to do as part of a direct
// call from Program.Main, and before any 'awaits'.
JSRuntime.SetCurrentJSRuntime(_runtime);
SetBrowserHttpMessageHandlerAsDefault();

return StartAsyncAwaited();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
Expand All @@ -13,9 +13,11 @@
</ItemGroup>

<ItemGroup>
<Compile Include="..\..\..\Shared\src\BrowserNavigationManagerInterop.cs" />
<Compile Include="..\..\..\Shared\src\JsonSerializerOptionsProvider.cs" />
<Compile Include="..\..\..\Shared\src\WebEventData.cs" />
<Compile Include="$(ComponentsSharedSourceRoot)src\BrowserNavigationManagerInterop.cs" />
<Compile Include="$(ComponentsSharedSourceRoot)src\JsonSerializerOptionsProvider.cs" />
<Compile Include="$(ComponentsSharedSourceRoot)src\WebEventData.cs" />

<Compile Include="$(ComponentsSharedSourceRoot)src\ElementReferenceJsonConverter.cs" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Threading.Tasks;
using Microsoft.AspNetCore.Components.RenderTree;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.JSInterop;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Blazor.Services;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Rendering;
using Microsoft.AspNetCore.Components.RenderTree;
using Microsoft.Extensions.Logging;

namespace Microsoft.AspNetCore.Blazor.Rendering
Expand Down
26 changes: 24 additions & 2 deletions src/Components/Blazor/Blazor/src/Services/WebAssemblyJSRuntime.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Microsoft.AspNetCore.Components;
using Mono.WebAssembly.Interop;

namespace Microsoft.AspNetCore.Blazor.Services
{
internal static class WebAssemblyJSRuntime
internal sealed class WebAssemblyJSRuntime : MonoWebAssemblyJSRuntime
{
public static readonly MonoWebAssemblyJSRuntime Instance = new MonoWebAssemblyJSRuntime();
private static readonly WebAssemblyJSRuntime _instance = new WebAssemblyJSRuntime();
private static bool _initialized;

public WebAssemblyJSRuntime()
{
JsonSerializerOptions.Converters.Add(new ElementReferenceJsonConverter());
}

public static WebAssemblyJSRuntime Instance
{
get
{
if (!_initialized)
{
// This is executing in MonoWASM. Consequently we do not to have concern ourselves with thread safety.
_initialized = true;
Initialize(_instance);
}

return _instance;
}
}
}
}
5 changes: 5 additions & 0 deletions src/Components/Blazor/Build/test/BindRazorIntegrationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ public void Render_BuiltIn_BindToInputWithoutType_WritesAttributes()
{
// Arrange
var component = CompileToComponent(@"
@using Microsoft.AspNetCore.Components.Web
<input @bind=""@ParentValue"" />
@code {
public int ParentValue { get; set; } = 42;
Expand All @@ -292,6 +293,7 @@ public void Render_BuiltIn_BindToInputText_WithFormat_WritesAttributes()
{
// Arrange
var component = CompileToComponent(@"
@using Microsoft.AspNetCore.Components.Web
<input type=""text"" @bind=""@CurrentDate"" @bind:format=""MM/dd/yyyy""/>
@code {
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
Expand All @@ -314,6 +316,7 @@ public void Render_BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttribut
{
// Arrange
var component = CompileToComponent(@"
@using Microsoft.AspNetCore.Components.Web
<input type=""text"" @bind=""@CurrentDate"" @bind:format=""@Format""/>
@code {
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
Expand All @@ -338,6 +341,7 @@ public void Render_BuiltIn_BindToInputText_WritesAttributes()
{
// Arrange
var component = CompileToComponent(@"
@using Microsoft.AspNetCore.Components.Web
<input type=""text"" @bind=""@ParentValue"" />
@code {
public int ParentValue { get; set; } = 42;
Expand All @@ -360,6 +364,7 @@ public void Render_BuiltIn_BindToInputCheckbox_WritesAttributes()
{
// Arrange
var component = CompileToComponent(@"
@using Microsoft.AspNetCore.Components.Web
<input type=""checkbox"" @bind=""@Enabled"" />
@code {
public bool Enabled { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.RenderTree;
using Microsoft.AspNetCore.Components.Test.Helpers;
using Microsoft.AspNetCore.Components.Web;
using Xunit;
using Xunit.Abstractions;

Expand Down Expand Up @@ -202,23 +203,25 @@ public void Render_ChildComponent_WithEventHandler(string expression)
AdditionalSyntaxTrees.Add(Parse(@"
using System;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;

namespace Test
{
public class MyComponent : ComponentBase
{
[Parameter]
public Action<UIMouseEventArgs> OnClick { get; set; }
public Action<MouseEventArgs> OnClick { get; set; }
}
}
"));

var component = CompileToComponent($@"
@using Microsoft.AspNetCore.Components.Web
<MyComponent OnClick=""{expression}""/>

@code {{
private int counter;
private void Increment(UIMouseEventArgs e) {{
private void Increment(MouseEventArgs e) {{
counter++;
}}
}}");
Expand All @@ -235,7 +238,7 @@ private void Increment(UIMouseEventArgs e) {{
AssertFrame.Attribute(frame, "OnClick", 1);

// The handler will have been assigned to a lambda
var handler = Assert.IsType<Action<UIMouseEventArgs>>(frame.AttributeValue);
var handler = Assert.IsType<Action<MouseEventArgs>>(frame.AttributeValue);
Assert.Equal("Test.TestComponent", handler.Target.GetType().FullName);
});
}
Expand Down Expand Up @@ -445,11 +448,12 @@ public void Regression_784()

// Act
var component = CompileToComponent(@"
@using Microsoft.AspNetCore.Components.Web
<p @onmouseover=""OnComponentHover"" style=""background: @ParentBgColor;"" />
@code {
public string ParentBgColor { get; set; } = ""#FFFFFF"";

public void OnComponentHover(UIMouseEventArgs e)
public void OnComponentHover(MouseEventArgs e)
{
}
}
Expand Down
81 changes: 45 additions & 36 deletions src/Components/Blazor/Build/test/RenderingRazorIntegrationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.RenderTree;
using Microsoft.AspNetCore.Components.Test.Helpers;
using Microsoft.AspNetCore.Components.Web;
using Xunit;
using Xunit.Abstractions;

Expand Down Expand Up @@ -308,11 +309,12 @@ public void SupportsUsingStatements()
public async Task SupportsTwoWayBindingForTextboxes()
{
// Arrange/Act
var component = CompileToComponent(
@"<input @bind=""MyValue"" />
@code {
public string MyValue { get; set; } = ""Initial value"";
}");
var component = CompileToComponent(@"
@using Microsoft.AspNetCore.Components.Web
<input @bind=""MyValue"" />
@code {
public string MyValue { get; set; } = ""Initial value"";
}");
var myValueProperty = component.GetType().GetProperty("MyValue");

var renderer = new TestRenderer();
Expand Down Expand Up @@ -343,11 +345,12 @@ public async Task SupportsTwoWayBindingForTextboxes()
public async Task SupportsTwoWayBindingForTextareas()
{
// Arrange/Act
var component = CompileToComponent(
@"<textarea @bind=""MyValue"" ></textarea>
@code {
public string MyValue { get; set; } = ""Initial value"";
}");
var component = CompileToComponent(@"
@using Microsoft.AspNetCore.Components.Web
<textarea @bind=""MyValue"" ></textarea>
@code {
public string MyValue { get; set; } = ""Initial value"";
}");
var myValueProperty = component.GetType().GetProperty("MyValue");

var renderer = new TestRenderer();
Expand Down Expand Up @@ -378,11 +381,12 @@ public async Task SupportsTwoWayBindingForTextareas()
public async Task SupportsTwoWayBindingForDateValues()
{
// Arrange/Act
var component = CompileToComponent(
@"<input @bind=""MyDate"" />
@code {
public DateTime MyDate { get; set; } = new DateTime(2018, 3, 4, 1, 2, 3);
}");
var component = CompileToComponent(@"
@using Microsoft.AspNetCore.Components.Web
<input @bind=""MyDate"" />
@code {
public DateTime MyDate { get; set; } = new DateTime(2018, 3, 4, 1, 2, 3);
}");
var myDateProperty = component.GetType().GetProperty("MyDate");

var renderer = new TestRenderer();
Expand Down Expand Up @@ -416,11 +420,12 @@ public async Task SupportsTwoWayBindingForDateValuesWithFormatString()
{
// Arrange/Act
var testDateFormat = "ddd yyyy-MM-dd";
var component = CompileToComponent(
$@"<input @bind=""@MyDate"" @bind:format=""{testDateFormat}"" />
@code {{
public DateTime MyDate {{ get; set; }} = new DateTime(2018, 3, 4);
}}");
var component = CompileToComponent($@"
@using Microsoft.AspNetCore.Components.Web
<input @bind=""@MyDate"" @bind:format=""{testDateFormat}"" />
@code {{
public DateTime MyDate {{ get; set; }} = new DateTime(2018, 3, 4);
}}");
var myDateProperty = component.GetType().GetProperty("MyDate");

var renderer = new TestRenderer();
Expand Down Expand Up @@ -467,6 +472,7 @@ public void SupportsEventHandlerWithLambda()
{
// Arrange
var component = CompileToComponent(@"
@using Microsoft.AspNetCore.Components.Web
<button @onclick=""x => Clicked = true"" />
@code {
public bool Clicked { get; set; }
Expand All @@ -486,10 +492,10 @@ public void SupportsEventHandlerWithLambda()
{
AssertFrame.Attribute(frame, "onclick", 1);

var func = Assert.IsType<Action<UIMouseEventArgs>>(frame.AttributeValue);
var func = Assert.IsType<Action<MouseEventArgs>>(frame.AttributeValue);
Assert.False((bool)clicked.GetValue(component));

func(new UIMouseEventArgs());
func(new MouseEventArgs());
Assert.True((bool)clicked.GetValue(component));
});
}
Expand All @@ -499,9 +505,10 @@ public void SupportsEventHandlerWithMethodGroup()
{
// Arrange
var component = CompileToComponent(@"
@using Microsoft.AspNetCore.Components.Web
<button @onclick=""OnClick"" />
@code {
public void OnClick(UIMouseEventArgs e) { Clicked = true; }
public void OnClick(MouseEventArgs e) { Clicked = true; }
public bool Clicked { get; set; }
}");

Expand All @@ -513,33 +520,34 @@ public void SupportsEventHandlerWithMethodGroup()
var frames = GetRenderTree(renderer, component);

// Assert
Action<UIMouseEventArgs> func = default; // Since this is a method group, we don't need to create an EventCallback
Action<MouseEventArgs> func = default; // Since this is a method group, we don't need to create an EventCallback
Assert.Collection(
frames,
frame => AssertFrame.Element(frame, "button", 2, 0),
frame =>
{
AssertFrame.Attribute(frame, "onclick", 1);

func = Assert.IsType<Action<UIMouseEventArgs>>(frame.AttributeValue);
func = Assert.IsType<Action<MouseEventArgs>>(frame.AttributeValue);
Assert.False((bool)clicked.GetValue(component));


});

func.Invoke(new UIMouseEventArgs());
func.Invoke(new MouseEventArgs());
Assert.True((bool)clicked.GetValue(component));
}

[Fact]
public async Task SupportsTwoWayBindingForBoolValues()
{
// Arrange/Act
var component = CompileToComponent(
@"<input @bind=""MyValue"" />
@code {
public bool MyValue { get; set; } = true;
}");
var component = CompileToComponent(@"
@using Microsoft.AspNetCore.Components.Web
<input @bind=""MyValue"" />
@code {
public bool MyValue { get; set; } = true;
}");
var myValueProperty = component.GetType().GetProperty("MyValue");

var renderer = new TestRenderer();
Expand Down Expand Up @@ -571,11 +579,12 @@ public async Task SupportsTwoWayBindingForEnumValues()
{
// Arrange/Act
var myEnumType = FullTypeName<MyEnum>();
var component = CompileToComponent(
$@"<input @bind=""MyValue"" />
@code {{
public {myEnumType} MyValue {{ get; set; }} = {myEnumType}.{nameof(MyEnum.FirstValue)};
}}");
var component = CompileToComponent($@"
@using Microsoft.AspNetCore.Components.Web
<input @bind=""MyValue"" />
@code {{
public {myEnumType} MyValue {{ get; set; }} = {myEnumType}.{nameof(MyEnum.FirstValue)};
}}");
var myValueProperty = component.GetType().GetProperty("MyValue");

var renderer = new TestRenderer();
Expand Down
Loading