From 735807d6ffc5a2affa2d0274586d7824ed115ea4 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Fri, 9 Aug 2019 09:53:31 -0700 Subject: [PATCH 01/24] Skip flaky HTTPS devcert test on 2.2 (#12980) --- src/Tools/FirstRunCertGenerator/test/CertificateManagerTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tools/FirstRunCertGenerator/test/CertificateManagerTests.cs b/src/Tools/FirstRunCertGenerator/test/CertificateManagerTests.cs index b11f92ee54..0cc2604570 100644 --- a/src/Tools/FirstRunCertGenerator/test/CertificateManagerTests.cs +++ b/src/Tools/FirstRunCertGenerator/test/CertificateManagerTests.cs @@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Certificates.Generation.Tests } } - [Fact] + [Fact(Skip = "True")] public void EnsureCreateHttpsCertificate2_CreatesACertificate_WhenThereAreNoHttpsCertificates() { try From 09db3ebbae7f7500f534e744d9893c396458766a Mon Sep 17 00:00:00 2001 From: Pratik Sanglikar Date: Fri, 9 Aug 2019 18:55:52 -0700 Subject: [PATCH 02/24] Enable Docker Support checkbox for Blazor Server apps and gRPC apps. (#13016) * Enable the checkbox "Add Docker Support" for Blazor apps. Enable the checkbox "Add Docker Support" for Blazor apps. * Enable "Enable Docker Support" checkbox for gRPC projects. Enable "Enable Docker Support" checkbox for gRPC projects. --- .../.template.config/vs-2017.3.host.json | 3 ++- .../GrpcService-CSharp/.template.config/vs-2017.3.host.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/vs-2017.3.host.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/vs-2017.3.host.json index 07e937da48..457a0671ba 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/vs-2017.3.host.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/vs-2017.3.host.json @@ -61,5 +61,6 @@ "excludeLaunchSettings": false, "azureReplyUrlPortName": "HttpsPort", "minFullFrameworkVersion": "4.6.1", - "disableHttpsSymbol": "NoHttps" + "disableHttpsSymbol": "NoHttps", + "supportsDocker": true } diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/vs-2017.3.host.json b/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/vs-2017.3.host.json index 9334bf7619..4ae9d5d722 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/vs-2017.3.host.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/vs-2017.3.host.json @@ -14,6 +14,6 @@ "icon": "vs-2017.3/gRPC.png", "learnMoreLink": "https://go.microsoft.com/fwlink/?LinkID=784883", "uiFilters": [ "oneaspnet" ], - "supportsDocker": false, + "supportsDocker": true, "excludeLaunchSettings": false } From 8ef285620ce7a8f07bc866295b0be39fc0aa5d8f Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Fri, 9 Aug 2019 19:04:33 -0700 Subject: [PATCH 03/24] Remove references to OnReaderCompleted and OnWriterCompleted (#13018) --- ...HttpConnectionTests.ConnectionLifecycle.cs | 3 +- .../HubConnectionTests.ConnectionLifecycle.cs | 6 +-- .../Client/test/UnitTests/TestConnection.cs | 10 +--- .../test/HttpConnectionManagerTests.cs | 39 ++++++---------- .../Tests.Utils/PipeCompletionExtensions.cs | 46 ------------------- 5 files changed, 18 insertions(+), 86 deletions(-) delete mode 100644 src/SignalR/common/testassets/Tests.Utils/PipeCompletionExtensions.cs diff --git a/src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.ConnectionLifecycle.cs b/src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.ConnectionLifecycle.cs index 1c2280e42d..fa95fbc83b 100644 --- a/src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.ConnectionLifecycle.cs +++ b/src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.ConnectionLifecycle.cs @@ -316,8 +316,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests await connection.StartAsync().OrTimeout(); await connection.Transport.Output.WriteAsync(new byte[] { 0x42 }).OrTimeout(); - // We should get the exception in the transport input completion. - await Assert.ThrowsAsync(() => connection.Transport.Input.WaitForWriterToComplete()).OrTimeout(); + await Assert.ThrowsAsync(async () => await connection.Transport.Input.ReadAsync()); }); } } diff --git a/src/SignalR/clients/csharp/Client/test/UnitTests/HubConnectionTests.ConnectionLifecycle.cs b/src/SignalR/clients/csharp/Client/test/UnitTests/HubConnectionTests.ConnectionLifecycle.cs index 02a5ae1961..3c669ef94d 100644 --- a/src/SignalR/clients/csharp/Client/test/UnitTests/HubConnectionTests.ConnectionLifecycle.cs +++ b/src/SignalR/clients/csharp/Client/test/UnitTests/HubConnectionTests.ConnectionLifecycle.cs @@ -367,10 +367,6 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests var connectionClosed = new TaskCompletionSource(); await AsyncUsing(CreateHubConnection(testConnection), async connection => { -#pragma warning disable 0618 - // We're hooking the TestConnection shutting down here because the HubConnection one will be blocked on the lock - testConnection.Transport.Input.OnWriterCompleted((_, __) => testConnectionClosed.TrySetResult(null), null); -#pragma warning restore connection.Closed += (e) => { connectionClosed.TrySetResult(null); @@ -385,7 +381,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests testConnection.CompleteFromTransport(); // Wait for the connection to close. - await testConnectionClosed.Task.OrTimeout(); + await testConnection.Transport.Input.CompleteAsync(); // The stop should be completed. await stopTask.OrTimeout(); diff --git a/src/SignalR/clients/csharp/Client/test/UnitTests/TestConnection.cs b/src/SignalR/clients/csharp/Client/test/UnitTests/TestConnection.cs index 806863e3f5..fbc516e95c 100644 --- a/src/SignalR/clients/csharp/Client/test/UnitTests/TestConnection.cs +++ b/src/SignalR/clients/csharp/Client/test/UnitTests/TestConnection.cs @@ -52,15 +52,6 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests var pair = DuplexPipe.CreateConnectionPair(options, options); Application = pair.Application; Transport = pair.Transport; - - // TODO: Resolve this, for now we use Pipe which works -#pragma warning disable 0618 - Application.Input.OnWriterCompleted((ex, _) => - { - Application.Output.Complete(); - }, - null); -#pragma warning restore 0618 } public override ValueTask DisposeAsync() => DisposeCoreAsync(); @@ -156,6 +147,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests } else if (result.IsCompleted) { + await Application.Output.CompleteAsync(); return null; } } diff --git a/src/SignalR/common/Http.Connections/test/HttpConnectionManagerTests.cs b/src/SignalR/common/Http.Connections/test/HttpConnectionManagerTests.cs index eae60a076d..5c30a490f7 100644 --- a/src/SignalR/common/Http.Connections/test/HttpConnectionManagerTests.cs +++ b/src/SignalR/common/Http.Connections/test/HttpConnectionManagerTests.cs @@ -1,8 +1,6 @@ // 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. -#pragma warning disable CS0618 // TODO: Remove when we replace the events - using System; using System.Buffers; using System.IO.Pipelines; @@ -100,11 +98,6 @@ namespace Microsoft.AspNetCore.Http.Connections.Tests var transportInputTcs = new TaskCompletionSource(); var transportOutputTcs = new TaskCompletionSource(); - connection.Transport.Input.OnWriterCompleted((_, __) => transportInputTcs.TrySetResult(null), null); - connection.Transport.Output.OnReaderCompleted((_, __) => transportOutputTcs.TrySetResult(null), null); - connection.Application.Input.OnWriterCompleted((_, __) => applicationInputTcs.TrySetResult(null), null); - connection.Application.Output.OnReaderCompleted((_, __) => applicationOutputTcs.TrySetResult(null), null); - try { await connection.DisposeAsync(closeGracefully).OrTimeout(); @@ -114,7 +107,17 @@ namespace Microsoft.AspNetCore.Http.Connections.Tests // Ignore the exception that bubbles out of the failing task } - await Task.WhenAll(applicationInputTcs.Task, applicationOutputTcs.Task, transportInputTcs.Task, transportOutputTcs.Task).OrTimeout(); + var result = await connection.Transport.Output.FlushAsync(); + Assert.True(result.IsCompleted); + + result = await connection.Application.Output.FlushAsync(); + Assert.True(result.IsCompleted); + + var exception = await Assert.ThrowsAsync(async () => await connection.Transport.Input.ReadAsync()); + Assert.Equal("Reading is not allowed after reader was completed.", exception.Message); + + exception = await Assert.ThrowsAsync(async () => await connection.Application.Input.ReadAsync()); + Assert.Equal("Reading is not allowed after reader was completed.", exception.Message); } } @@ -342,16 +345,10 @@ namespace Microsoft.AspNetCore.Http.Connections.Tests var connection = connectionManager.CreateConnection(PipeOptions.Default, PipeOptions.Default); - connection.Application.Output.OnReaderCompleted((error, state) => - { - tcs.TrySetResult(null); - }, - null); - appLifetime.StopApplication(); - // Connection should be disposed so this should complete immediately - await tcs.Task.OrTimeout(); + var result = await connection.Application.Output.FlushAsync(); + Assert.True(result.IsCompleted); } } @@ -368,16 +365,10 @@ namespace Microsoft.AspNetCore.Http.Connections.Tests var connection = connectionManager.CreateConnection(PipeOptions.Default, PipeOptions.Default); - connection.Application.Output.OnReaderCompleted((error, state) => - { - tcs.TrySetResult(null); - }, - null); - appLifetime.StopApplication(); - // Connection should be disposed so this should complete immediately - await tcs.Task.OrTimeout(); + var result = await connection.Application.Output.FlushAsync(); + Assert.True(result.IsCompleted); } } diff --git a/src/SignalR/common/testassets/Tests.Utils/PipeCompletionExtensions.cs b/src/SignalR/common/testassets/Tests.Utils/PipeCompletionExtensions.cs deleted file mode 100644 index 03a45ea3fe..0000000000 --- a/src/SignalR/common/testassets/Tests.Utils/PipeCompletionExtensions.cs +++ /dev/null @@ -1,46 +0,0 @@ -// 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. - -#pragma warning disable 0618 // TODO: Remove dependency on pipe events - -using System.Threading.Tasks; - -namespace System.IO.Pipelines -{ - public static class PipeCompletionExtensions - { - public static Task WaitForWriterToComplete(this PipeReader reader) - { - var tcs = new TaskCompletionSource(); - reader.OnWriterCompleted((ex, state) => - { - if (ex != null) - { - ((TaskCompletionSource)state).TrySetException(ex); - } - else - { - ((TaskCompletionSource)state).TrySetResult(null); - } - }, tcs); - return tcs.Task; - } - - public static Task WaitForReaderToComplete(this PipeWriter writer) - { - var tcs = new TaskCompletionSource(); - writer.OnReaderCompleted((ex, state) => - { - if (ex != null) - { - ((TaskCompletionSource)state).TrySetException(ex); - } - else - { - ((TaskCompletionSource)state).TrySetResult(null); - } - }, tcs); - return tcs.Task; - } - } -} From 88a3a74dbb4fe04ac6265191a15d7c9a8013d70f Mon Sep 17 00:00:00 2001 From: John Luo Date: Fri, 9 Aug 2019 19:25:48 -0700 Subject: [PATCH 04/24] Multitarget packages to remove dependencies for source build (#12936) --- eng/SharedFramework.External.props | 4 +- .../Microsoft.AspNetCore.Components.csproj | 7 +- ...oft.AspNetCore.Components.netcoreapp3.0.cs | 681 ++++++++++++++++++ .../Microsoft.AspNetCore.Components.csproj | 16 +- ....AspNetCore.Components.multitarget.nuspec} | 11 +- ...AspNetCore.Components.netcoreapp3.0.nuspec | 19 + ...Microsoft.AspNetCore.Components.Web.csproj | 7 +- ...AspNetCore.Components.Web.netcoreapp3.0.cs | 433 +++++++++++ ...Microsoft.AspNetCore.Components.Web.csproj | 3 +- ...Microsoft.AspNetCore.DataProtection.csproj | 13 +- ...AspNetCore.DataProtection.netcoreapp3.0.cs | 423 +++++++++++ ...Microsoft.AspNetCore.DataProtection.csproj | 6 +- ...spNetCore.DataProtection.Extensions.csproj | 7 +- ...DataProtection.Extensions.netcoreapp3.0.cs | 29 + ...spNetCore.DataProtection.Extensions.csproj | 3 +- .../Microsoft.AspNetCore.Http.Features.csproj | 7 +- ....AspNetCore.Http.Features.netcoreapp3.0.cs | 309 ++++++++ .../Microsoft.AspNetCore.Http.Features.csproj | 3 +- .../Microsoft.Extensions.Identity.Core.csproj | 1 + ...icrosoft.Extensions.Identity.Stores.csproj | 7 +- ...xtensions.Identity.Stores.netcoreapp3.0.cs | 210 ++++++ ...icrosoft.Extensions.Identity.Stores.csproj | 3 +- .../Microsoft.AspNetCore.Authorization.csproj | 8 +- ....AspNetCore.Authorization.netcoreapp3.0.cs | 224 ++++++ .../Microsoft.AspNetCore.Authorization.csproj | 3 +- ...AspNetCore.Connections.Abstractions.csproj | 8 +- ....Connections.Abstractions.netcoreapp3.0.cs | 202 ++++++ ...AspNetCore.Connections.Abstractions.csproj | 3 +- ....AspNetCore.Http.Connections.Common.csproj | 1 + ...t.AspNetCore.SignalR.Protocols.Json.csproj | 1 + ...Microsoft.AspNetCore.SignalR.Common.csproj | 1 + 31 files changed, 2628 insertions(+), 25 deletions(-) create mode 100644 src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs rename src/Components/Components/src/{Microsoft.AspNetCore.Components.nuspec => Microsoft.AspNetCore.Components.multitarget.nuspec} (61%) create mode 100644 src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp3.0.nuspec create mode 100644 src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.netcoreapp3.0.cs create mode 100644 src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.netcoreapp3.0.cs create mode 100644 src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.netcoreapp3.0.cs create mode 100644 src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.netcoreapp3.0.cs create mode 100644 src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.netcoreapp3.0.cs create mode 100644 src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.netcoreapp3.0.cs create mode 100644 src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.netcoreapp3.0.cs diff --git a/eng/SharedFramework.External.props b/eng/SharedFramework.External.props index d4f2fb4339..36ea360df2 100644 --- a/eng/SharedFramework.External.props +++ b/eng/SharedFramework.External.props @@ -93,7 +93,7 @@ These compilation references are necessary to compile netstandard2.0 assemblies which are in the shared framework. This references are part of Microsoft.NETCore.App, so are listed here as references to be used during compilation only. --> - + <_CompilationOnlyReference Include="Microsoft.Win32.Registry" /> <_CompilationOnlyReference Include="System.Security.Cryptography.Cng" /> <_CompilationOnlyReference Include="System.Security.Principal.Windows" /> @@ -107,7 +107,7 @@ These compilation references are necessary to workaround the mismatch of what is found in the ref pack for NETCore.App and what is actually present at runtime. See https://github.com/dotnet/corefx/issues/34906 --> - + <_CompilationOnlyReference Include="Microsoft.Win32.Registry" /> <_CompilationOnlyReference Include="System.Security.Cryptography.Cng" /> <_CompilationOnlyReference Include="System.Security.Principal.Windows" /> diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj b/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj index 4e878d13e3..f37a151e2d 100644 --- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.0;netcoreapp3.0 @@ -9,4 +9,9 @@ + + + + + diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs new file mode 100644 index 0000000000..e3d29e6a52 --- /dev/null +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs @@ -0,0 +1,681 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + public partial class AuthenticationState + { + public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) { } + public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task task); + public abstract partial class AuthenticationStateProvider + { + protected AuthenticationStateProvider() { } + public event Microsoft.AspNetCore.Components.AuthenticationStateChangedHandler AuthenticationStateChanged { add { } remove { } } + public abstract System.Threading.Tasks.Task GetAuthenticationStateAsync(); + protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task task) { } + } + public sealed partial class AuthorizeRouteView : Microsoft.AspNetCore.Components.RouteView + { + public AuthorizeRouteView() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + } + public partial class AuthorizeView : Microsoft.AspNetCore.Components.AuthorizeViewCore + { + public AuthorizeView() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; } + } + public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase + { + protected AuthorizeViewCore() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData(); + [System.Diagnostics.DebuggerStepThroughAttribute] + protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; } + } + public static partial class BindConverter + { + public static bool FormatValue(bool value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(System.DateTime value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(System.DateTime value, string format, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(System.DateTimeOffset value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(System.DateTimeOffset value, string format, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(decimal value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(double value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(int value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(long value, System.Globalization.CultureInfo culture = null) { throw null; } + public static bool? FormatValue(bool? value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(System.DateTimeOffset? value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(System.DateTimeOffset? value, string format, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(System.DateTime? value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(System.DateTime? value, string format, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(decimal? value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(double? value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(int? value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(long? value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(float? value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(float value, System.Globalization.CultureInfo culture = null) { throw null; } + public static string FormatValue(string value, System.Globalization.CultureInfo culture = null) { throw null; } + public static object FormatValue(T value, System.Globalization.CultureInfo culture = null) { throw null; } + public static bool TryConvertToBool(object obj, System.Globalization.CultureInfo culture, out bool value) { throw null; } + public static bool TryConvertToDateTime(object obj, System.Globalization.CultureInfo culture, out System.DateTime value) { throw null; } + public static bool TryConvertToDateTime(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTime value) { throw null; } + public static bool TryConvertToDateTimeOffset(object obj, System.Globalization.CultureInfo culture, out System.DateTimeOffset value) { throw null; } + public static bool TryConvertToDateTimeOffset(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTimeOffset value) { throw null; } + public static bool TryConvertToDecimal(object obj, System.Globalization.CultureInfo culture, out decimal value) { throw null; } + public static bool TryConvertToDouble(object obj, System.Globalization.CultureInfo culture, out double value) { throw null; } + public static bool TryConvertToFloat(object obj, System.Globalization.CultureInfo culture, out float value) { throw null; } + public static bool TryConvertToInt(object obj, System.Globalization.CultureInfo culture, out int value) { throw null; } + public static bool TryConvertToLong(object obj, System.Globalization.CultureInfo culture, out long value) { throw null; } + public static bool TryConvertToNullableBool(object obj, System.Globalization.CultureInfo culture, out bool? value) { throw null; } + public static bool TryConvertToNullableDateTime(object obj, System.Globalization.CultureInfo culture, out System.DateTime? value) { throw null; } + public static bool TryConvertToNullableDateTime(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTime? value) { throw null; } + public static bool TryConvertToNullableDateTimeOffset(object obj, System.Globalization.CultureInfo culture, out System.DateTimeOffset? value) { throw null; } + public static bool TryConvertToNullableDateTimeOffset(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTimeOffset? value) { throw null; } + public static bool TryConvertToNullableDecimal(object obj, System.Globalization.CultureInfo culture, out decimal? value) { throw null; } + public static bool TryConvertToNullableDouble(object obj, System.Globalization.CultureInfo culture, out double? value) { throw null; } + public static bool TryConvertToNullableFloat(object obj, System.Globalization.CultureInfo culture, out float? value) { throw null; } + public static bool TryConvertToNullableInt(object obj, System.Globalization.CultureInfo culture, out int? value) { throw null; } + public static bool TryConvertToNullableLong(object obj, System.Globalization.CultureInfo culture, out long? value) { throw null; } + public static bool TryConvertToString(object obj, System.Globalization.CultureInfo culture, out string value) { throw null; } + public static bool TryConvertTo(object obj, System.Globalization.CultureInfo culture, out T value) { throw null; } + } + public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public CascadingAuthenticationState() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override void OnInitialized() { } + void System.IDisposable.Dispose() { } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] + public sealed partial class CascadingParameterAttribute : System.Attribute + { + public CascadingParameterAttribute() { } + public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class CascadingValue : Microsoft.AspNetCore.Components.IComponent + { + public CascadingValue() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public bool IsFixed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public TValue Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } + public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; } + } + public partial class ChangeEventArgs : System.EventArgs + { + public ChangeEventArgs() { } + public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public abstract partial class ComponentBase : Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IHandleEvent + { + public ComponentBase() { } + protected virtual void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected System.Threading.Tasks.Task InvokeAsync(System.Action workItem) { throw null; } + protected System.Threading.Tasks.Task InvokeAsync(System.Func workItem) { throw null; } + void Microsoft.AspNetCore.Components.IComponent.Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } + System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() { throw null; } + System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, object arg) { throw null; } + protected virtual void OnAfterRender() { } + protected virtual System.Threading.Tasks.Task OnAfterRenderAsync() { throw null; } + protected virtual void OnInitialized() { } + protected virtual System.Threading.Tasks.Task OnInitializedAsync() { throw null; } + protected virtual void OnParametersSet() { } + protected virtual System.Threading.Tasks.Task OnParametersSetAsync() { throw null; } + public virtual System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; } + protected virtual bool ShouldRender() { throw null; } + protected void StateHasChanged() { } + } + public abstract partial class Dispatcher + { + protected Dispatcher() { } + public abstract bool CheckAccess(); + public static Microsoft.AspNetCore.Components.Dispatcher CreateDefault() { throw null; } + public abstract System.Threading.Tasks.Task InvokeAsync(System.Action workItem); + public abstract System.Threading.Tasks.Task InvokeAsync(System.Func workItem); + public abstract System.Threading.Tasks.Task InvokeAsync(System.Func> workItem); + public abstract System.Threading.Tasks.Task InvokeAsync(System.Func workItem); + protected void OnUnhandledException(System.UnhandledExceptionEventArgs e) { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElementReference + { + private readonly object _dummy; + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EventCallback + { + private readonly object _dummy; + public static readonly Microsoft.AspNetCore.Components.EventCallback Empty; + public static readonly Microsoft.AspNetCore.Components.EventCallbackFactory Factory; + public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) { throw null; } + public bool HasDelegate { get { throw null; } } + public System.Threading.Tasks.Task InvokeAsync(object arg) { throw null; } + } + public sealed partial class EventCallbackFactory + { + public EventCallbackFactory() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, Microsoft.AspNetCore.Components.EventCallback callback) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Action callback) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Action callback) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Func callback) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Func callback) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public Microsoft.AspNetCore.Components.EventCallback CreateInferred(object receiver, System.Action callback, TValue value) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public Microsoft.AspNetCore.Components.EventCallback CreateInferred(object receiver, System.Func callback, TValue value) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, Microsoft.AspNetCore.Components.EventCallback callback) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, Microsoft.AspNetCore.Components.EventCallback callback) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Action callback) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Action callback) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Func callback) { throw null; } + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Func callback) { throw null; } + } + public static partial class EventCallbackFactoryBinderExtensions + { + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float? existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, string existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, T existingValue, System.Globalization.CultureInfo culture = null) { throw null; } + } + public static partial class EventCallbackFactoryEventArgsExtensions + { + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EventCallbackWorkItem + { + private readonly object _dummy; + public static readonly Microsoft.AspNetCore.Components.EventCallbackWorkItem Empty; + public EventCallbackWorkItem(System.MulticastDelegate @delegate) { throw null; } + public System.Threading.Tasks.Task InvokeAsync(object arg) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EventCallback + { + private readonly object _dummy; + public static readonly Microsoft.AspNetCore.Components.EventCallback Empty; + public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) { throw null; } + public bool HasDelegate { get { throw null; } } + public System.Threading.Tasks.Task InvokeAsync(TValue arg) { throw null; } + } + public partial interface IComponent + { + void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle); + System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters); + } + public partial interface IComponentContext + { + bool IsConnected { get; } + } + public partial interface IHandleAfterRender + { + System.Threading.Tasks.Task OnAfterRenderAsync(); + } + public partial interface IHandleEvent + { + System.Threading.Tasks.Task HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem item, object arg); + } + public partial interface IHostEnvironmentAuthenticationStateProvider + { + void SetAuthenticationState(System.Threading.Tasks.Task authenticationStateTask); + } + [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] + public sealed partial class InjectAttribute : System.Attribute + { + public InjectAttribute() { } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)] + public sealed partial class LayoutAttribute : System.Attribute + { + public LayoutAttribute(System.Type layoutType) { } + public System.Type LayoutType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public abstract partial class LayoutComponentBase : Microsoft.AspNetCore.Components.ComponentBase + { + protected LayoutComponentBase() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class LayoutView : Microsoft.AspNetCore.Components.IComponent + { + public LayoutView() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public System.Type Layout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } + public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; } + } + public sealed partial class LocationChangeException : System.Exception + { + public LocationChangeException(string message, System.Exception innerException) { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MarkupString + { + private readonly object _dummy; + public MarkupString(string value) { throw null; } + public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public static explicit operator Microsoft.AspNetCore.Components.MarkupString (string value) { throw null; } + public override string ToString() { throw null; } + } + public partial class NavigationException : System.Exception + { + public NavigationException(string uri) { } + public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public abstract partial class NavigationManager + { + protected NavigationManager() { } + public string BaseUri { get { throw null; } protected set { } } + public string Uri { get { throw null; } protected set { } } + public event System.EventHandler LocationChanged { add { } remove { } } + protected virtual void EnsureInitialized() { } + protected void Initialize(string baseUri, string uri) { } + public void NavigateTo(string uri, bool forceLoad = false) { } + protected abstract void NavigateToCore(string uri, bool forceLoad); + protected void NotifyLocationChanged(bool isInterceptedLink) { } + public System.Uri ToAbsoluteUri(string relativeUri) { throw null; } + public string ToBaseRelativePath(string uri) { throw null; } + } + public abstract partial class OwningComponentBase : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + protected OwningComponentBase() { } + protected bool IsDisposed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected System.IServiceProvider ScopedServices { get { throw null; } } + protected virtual void Dispose(bool disposing) { } + void System.IDisposable.Dispose() { } + } + public abstract partial class OwningComponentBase : Microsoft.AspNetCore.Components.OwningComponentBase, System.IDisposable + { + protected OwningComponentBase() { } + protected TService Service { get { throw null; } } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] + public sealed partial class ParameterAttribute : System.Attribute + { + public ParameterAttribute() { } + public bool CaptureUnmatchedValues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ParameterValue + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public bool Cascading { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ParameterView + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public static Microsoft.AspNetCore.Components.ParameterView Empty { get { throw null; } } + public static Microsoft.AspNetCore.Components.ParameterView FromDictionary(System.Collections.Generic.IDictionary parameters) { throw null; } + public Microsoft.AspNetCore.Components.ParameterView.Enumerator GetEnumerator() { throw null; } + public TValue GetValueOrDefault(string parameterName) { throw null; } + public TValue GetValueOrDefault(string parameterName, TValue defaultValue) { throw null; } + public void SetParameterProperties(object target) { } + public System.Collections.Generic.IReadOnlyDictionary ToDictionary() { throw null; } + public bool TryGetValue(string parameterName, out TValue result) { throw null; } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public partial struct Enumerator + { + private object _dummy; + private int _dummyPrimitive; + public Microsoft.AspNetCore.Components.ParameterValue Current { get { throw null; } } + public bool MoveNext() { throw null; } + } + } + public delegate void RenderFragment(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder); + public delegate Microsoft.AspNetCore.Components.RenderFragment RenderFragment(TValue value); + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RenderHandle + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Microsoft.AspNetCore.Components.Dispatcher Dispatcher { get { throw null; } } + public bool IsInitialized { get { throw null; } } + public void Render(Microsoft.AspNetCore.Components.RenderFragment renderFragment) { } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=false)] + public sealed partial class RouteAttribute : System.Attribute + { + public RouteAttribute(string template) { } + public string Template { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public sealed partial class RouteData + { + public RouteData(System.Type pageType, System.Collections.Generic.IReadOnlyDictionary routeValues) { } + public System.Type PageType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary RouteValues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public partial class RouteView : Microsoft.AspNetCore.Components.IComponent + { + public RouteView() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public System.Type DefaultLayout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RouteData RouteData { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } + protected virtual void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; } + } +} +namespace Microsoft.AspNetCore.Components.CompilerServices +{ + public static partial class RuntimeHelpers + { + public static Microsoft.AspNetCore.Components.EventCallback CreateInferredEventCallback(object receiver, System.Action callback, T value) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback CreateInferredEventCallback(object receiver, System.Func callback, T value) { throw null; } + public static T TypeCheck(T value) { throw null; } + } +} +namespace Microsoft.AspNetCore.Components.Forms +{ + public partial class DataAnnotationsValidator : Microsoft.AspNetCore.Components.ComponentBase + { + public DataAnnotationsValidator() { } + protected override void OnInitialized() { } + } + public sealed partial class EditContext + { + public EditContext(object model) { } + public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public event System.EventHandler OnFieldChanged { add { } remove { } } + public event System.EventHandler OnValidationRequested { add { } remove { } } + public event System.EventHandler OnValidationStateChanged { add { } remove { } } + public Microsoft.AspNetCore.Components.Forms.FieldIdentifier Field(string fieldName) { throw null; } + public System.Collections.Generic.IEnumerable GetValidationMessages() { throw null; } + public System.Collections.Generic.IEnumerable GetValidationMessages(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } + public System.Collections.Generic.IEnumerable GetValidationMessages(System.Linq.Expressions.Expression> accessor) { throw null; } + public bool IsModified() { throw null; } + public bool IsModified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } + public bool IsModified(System.Linq.Expressions.Expression> accessor) { throw null; } + public void MarkAsUnmodified() { } + public void MarkAsUnmodified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public void NotifyFieldChanged(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public void NotifyValidationStateChanged() { } + public bool Validate() { throw null; } + } + public static partial class EditContextDataAnnotationsExtensions + { + public static Microsoft.AspNetCore.Components.Forms.EditContext AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext editContext) { throw null; } + } + public sealed partial class FieldChangedEventArgs : System.EventArgs + { + public FieldChangedEventArgs(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FieldIdentifier : System.IEquatable + { + private readonly object _dummy; + public FieldIdentifier(object model, string fieldName) { throw null; } + public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public static Microsoft.AspNetCore.Components.Forms.FieldIdentifier Create(System.Linq.Expressions.Expression> accessor) { throw null; } + public bool Equals(Microsoft.AspNetCore.Components.Forms.FieldIdentifier otherIdentifier) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + } + public sealed partial class ValidationMessageStore + { + public ValidationMessageStore(Microsoft.AspNetCore.Components.Forms.EditContext editContext) { } + public System.Collections.Generic.IEnumerable this[Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier] { get { throw null; } } + public System.Collections.Generic.IEnumerable this[System.Linq.Expressions.Expression> accessor] { get { throw null; } } + public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, System.Collections.Generic.IEnumerable messages) { } + public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, string message) { } + public void Add(System.Linq.Expressions.Expression> accessor, System.Collections.Generic.IEnumerable messages) { } + public void Add(System.Linq.Expressions.Expression> accessor, string message) { } + public void Clear() { } + public void Clear(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public void Clear(System.Linq.Expressions.Expression> accessor) { } + } + public sealed partial class ValidationRequestedEventArgs : System.EventArgs + { + public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs Empty; + public ValidationRequestedEventArgs() { } + } + public sealed partial class ValidationStateChangedEventArgs : System.EventArgs + { + public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs Empty; + public ValidationStateChangedEventArgs() { } + } +} +namespace Microsoft.AspNetCore.Components.Rendering +{ + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ComponentRenderedText + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public int ComponentId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.IEnumerable Tokens { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public partial class EventFieldInfo + { + public EventFieldInfo() { } + public int ComponentId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public object FieldValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class HtmlRenderer : Microsoft.AspNetCore.Components.Rendering.Renderer + { + public HtmlRenderer(System.IServiceProvider serviceProvider, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Func htmlEncoder) : base (default(System.IServiceProvider), default(Microsoft.Extensions.Logging.ILoggerFactory)) { } + public override Microsoft.AspNetCore.Components.Dispatcher Dispatcher { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected override void HandleException(System.Exception exception) { } + [System.Diagnostics.DebuggerStepThroughAttribute] + public System.Threading.Tasks.Task RenderComponentAsync(System.Type componentType, Microsoft.AspNetCore.Components.ParameterView initialParameters) { throw null; } + public System.Threading.Tasks.Task RenderComponentAsync(Microsoft.AspNetCore.Components.ParameterView initialParameters) where TComponent : Microsoft.AspNetCore.Components.IComponent { throw null; } + protected override System.Threading.Tasks.Task UpdateDisplayAsync(in Microsoft.AspNetCore.Components.Rendering.RenderBatch renderBatch) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RenderBatch + { + private readonly object _dummy; + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange DisposedComponentIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange DisposedEventHandlerIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange ReferenceFrames { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange UpdatedComponents { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public abstract partial class Renderer : System.IDisposable + { + public Renderer(System.IServiceProvider serviceProvider, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } + public abstract Microsoft.AspNetCore.Components.Dispatcher Dispatcher { get; } + public event System.UnhandledExceptionEventHandler UnhandledSynchronizationException { add { } remove { } } + protected internal int AssignRootComponentId(Microsoft.AspNetCore.Components.IComponent component) { throw null; } + public virtual System.Threading.Tasks.Task DispatchEventAsync(ulong eventHandlerId, Microsoft.AspNetCore.Components.Rendering.EventFieldInfo fieldInfo, System.EventArgs eventArgs) { throw null; } + public void Dispose() { } + protected virtual void Dispose(bool disposing) { } + protected abstract void HandleException(System.Exception exception); + protected Microsoft.AspNetCore.Components.IComponent InstantiateComponent(System.Type componentType) { throw null; } + protected virtual void ProcessPendingRender() { } + protected System.Threading.Tasks.Task RenderRootComponentAsync(int componentId) { throw null; } + [System.Diagnostics.DebuggerStepThroughAttribute] + protected System.Threading.Tasks.Task RenderRootComponentAsync(int componentId, Microsoft.AspNetCore.Components.ParameterView initialParameters) { throw null; } + protected abstract System.Threading.Tasks.Task UpdateDisplayAsync(in Microsoft.AspNetCore.Components.Rendering.RenderBatch renderBatch); + } + public sealed partial class RenderTreeBuilder : System.IDisposable + { + public RenderTreeBuilder() { } + public void AddAttribute(int sequence, in Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame frame) { } + public void AddAttribute(int sequence, string name, Microsoft.AspNetCore.Components.EventCallback value) { } + public void AddAttribute(int sequence, string name, bool value) { } + public void AddAttribute(int sequence, string name, System.MulticastDelegate value) { } + public void AddAttribute(int sequence, string name, object value) { } + public void AddAttribute(int sequence, string name, string value) { } + public void AddAttribute(int sequence, string name, Microsoft.AspNetCore.Components.EventCallback value) { } + public void AddComponentReferenceCapture(int sequence, System.Action componentReferenceCaptureAction) { } + public void AddContent(int sequence, Microsoft.AspNetCore.Components.MarkupString markupContent) { } + public void AddContent(int sequence, Microsoft.AspNetCore.Components.RenderFragment fragment) { } + public void AddContent(int sequence, object textContent) { } + public void AddContent(int sequence, string textContent) { } + public void AddContent(int sequence, Microsoft.AspNetCore.Components.RenderFragment fragment, TValue value) { } + public void AddElementReferenceCapture(int sequence, System.Action elementReferenceCaptureAction) { } + public void AddMarkupContent(int sequence, string markupContent) { } + public void AddMultipleAttributes(int sequence, System.Collections.Generic.IEnumerable> attributes) { } + public void Clear() { } + public void CloseComponent() { } + public void CloseElement() { } + public void CloseRegion() { } + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange GetFrames() { throw null; } + public void OpenComponent(int sequence, System.Type componentType) { } + public void OpenComponent(int sequence) where TComponent : Microsoft.AspNetCore.Components.IComponent { } + public void OpenElement(int sequence, string elementName) { } + public void OpenRegion(int sequence) { } + public void SetKey(object value) { } + public void SetUpdatesAttributeName(string updatesAttributeName) { } + void System.IDisposable.Dispose() { } + } +} +namespace Microsoft.AspNetCore.Components.RenderTree +{ + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ArrayBuilderSegment : System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public T[] Array { get { throw null; } } + public int Count { get { throw null; } } + public T this[int index] { get { throw null; } } + public int Offset { get { throw null; } } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ArrayRange + { + public readonly T[] Array; + public readonly int Count; + public ArrayRange(T[] array, int count) { throw null; } + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange Clone() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RenderTreeDiff + { + public readonly int ComponentId; + public readonly Microsoft.AspNetCore.Components.RenderTree.ArrayBuilderSegment Edits; + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Explicit)] + public readonly partial struct RenderTreeEdit + { + [System.Runtime.InteropServices.FieldOffsetAttribute(8)] + public readonly int MoveToSiblingIndex; + [System.Runtime.InteropServices.FieldOffsetAttribute(8)] + public readonly int ReferenceFrameIndex; + [System.Runtime.InteropServices.FieldOffsetAttribute(16)] + public readonly string RemovedAttributeName; + [System.Runtime.InteropServices.FieldOffsetAttribute(4)] + public readonly int SiblingIndex; + [System.Runtime.InteropServices.FieldOffsetAttribute(0)] + public readonly Microsoft.AspNetCore.Components.RenderTree.RenderTreeEditType Type; + } + public enum RenderTreeEditType + { + PrependFrame = 1, + RemoveFrame = 2, + SetAttribute = 3, + RemoveAttribute = 4, + UpdateText = 5, + StepIn = 6, + StepOut = 7, + UpdateMarkup = 8, + PermutationListEntry = 9, + PermutationListEnd = 10, + } + public enum RenderTreeFrameType : short + { + None = (short)0, + Element = (short)1, + Text = (short)2, + Attribute = (short)3, + Component = (short)4, + Region = (short)5, + ElementReferenceCapture = (short)6, + ComponentReferenceCapture = (short)7, + Markup = (short)8, + } +} +namespace Microsoft.AspNetCore.Components.Routing +{ + public partial interface IHostEnvironmentNavigationManager + { + void Initialize(string baseUri, string uri); + } + public partial interface INavigationInterception + { + System.Threading.Tasks.Task EnableNavigationInterceptionAsync(); + } + public partial class LocationChangedEventArgs : System.EventArgs + { + public LocationChangedEventArgs(string location, bool isNavigationIntercepted) { } + public bool IsNavigationIntercepted { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public partial class Router : Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, System.IDisposable + { + public Router() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public System.Reflection.Assembly AppAssembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment Found { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment NotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } + public void Dispose() { } + System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() { throw null; } + public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; } + } +} diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj b/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj index dffcf43a97..622bfe76e2 100644 --- a/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj +++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj @@ -1,7 +1,8 @@  - netstandard2.0 + netstandard2.0;netcoreapp3.0 + netcoreapp3.0 Components feature for ASP.NET Core. true true @@ -17,6 +18,9 @@ + + + @@ -34,15 +38,17 @@ - Microsoft.AspNetCore.Components.nuspec + Microsoft.AspNetCore.Components.multitarget.nuspec + Microsoft.AspNetCore.Components.netcoreapp3.0.nuspec $(GenerateNuspecDependsOn);_GetNuspecDependencyPackageVersions - - - + + + + diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.nuspec b/src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec similarity index 61% rename from src/Components/Components/src/Microsoft.AspNetCore.Components.nuspec rename to src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec index 415e911bfe..6324ea3136 100644 --- a/src/Components/Components/src/Microsoft.AspNetCore.Components.nuspec +++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec @@ -9,12 +9,17 @@ + + + + + - - - + + + diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp3.0.nuspec b/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp3.0.nuspec new file mode 100644 index 0000000000..8dec24f270 --- /dev/null +++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp3.0.nuspec @@ -0,0 +1,19 @@ + + + + $CommonMetadataElements$ + + + + + + + + + + + + + + + diff --git a/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.csproj b/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.csproj index 315a324220..faed8fa4e2 100644 --- a/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.csproj +++ b/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.csproj @@ -1,11 +1,16 @@ - netstandard2.0 + netstandard2.0;netcoreapp3.0 + + + + + diff --git a/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.netcoreapp3.0.cs b/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.netcoreapp3.0.cs new file mode 100644 index 0000000000..f6a30257c2 --- /dev/null +++ b/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.netcoreapp3.0.cs @@ -0,0 +1,433 @@ +// 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. + +namespace Microsoft.AspNetCore.Components +{ + [Microsoft.AspNetCore.Components.BindElementAttribute("select", null, "value", "onchange")] + [Microsoft.AspNetCore.Components.BindElementAttribute("textarea", null, "value", "onchange")] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("checkbox", null, "checked", "onchange", false, null)] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("date", "value", "value", "onchange", true, "yyyy-MM-dd")] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("date", null, "value", "onchange", true, "yyyy-MM-dd")] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("number", "value", "value", "onchange", true, null)] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("number", null, "value", "onchange", true, null)] + [Microsoft.AspNetCore.Components.BindInputElementAttribute("text", null, "value", "onchange", false, null)] + [Microsoft.AspNetCore.Components.BindInputElementAttribute(null, "value", "value", "onchange", false, null)] + [Microsoft.AspNetCore.Components.BindInputElementAttribute(null, null, "value", "onchange", false, null)] + public static partial class BindAttributes + { + } + [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)] + public sealed partial class BindElementAttribute : System.Attribute + { + public BindElementAttribute(string element, string suffix, string valueAttribute, string changeAttribute) { } + public string ChangeAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Element { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Suffix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string ValueAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)] + public sealed partial class BindInputElementAttribute : System.Attribute + { + public BindInputElementAttribute(string type, string suffix, string valueAttribute, string changeAttribute, bool isInvariantCulture, string format) { } + public string ChangeAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Format { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public bool IsInvariantCulture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Suffix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string ValueAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public partial class DataTransfer + { + public DataTransfer() { } + public string DropEffect { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string EffectAllowed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string[] Files { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Components.UIDataTransferItem[] Items { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string[] Types { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)] + public sealed partial class EventHandlerAttribute : System.Attribute + { + public EventHandlerAttribute(string attributeName, System.Type eventArgsType) { } + public string AttributeName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Type EventArgsType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onabort", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onactivate", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforeactivate", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforecopy", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforecut", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforedeactivate", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onbeforepaste", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onblur", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncanplay", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncanplaythrough", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onchange", typeof(Microsoft.AspNetCore.Components.ChangeEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onclick", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncontextmenu", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncopy", typeof(Microsoft.AspNetCore.Components.UIClipboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncuechange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oncut", typeof(Microsoft.AspNetCore.Components.UIClipboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondblclick", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondeactivate", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondrag", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragend", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragenter", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragleave", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragover", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondragstart", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondrop", typeof(Microsoft.AspNetCore.Components.UIDragEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ondurationchange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onemptied", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onended", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onerror", typeof(Microsoft.AspNetCore.Components.UIErrorEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocus", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocusin", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfocusout", typeof(Microsoft.AspNetCore.Components.UIFocusEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfullscreenchange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onfullscreenerror", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ongotpointercapture", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oninput", typeof(Microsoft.AspNetCore.Components.ChangeEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("oninvalid", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeydown", typeof(Microsoft.AspNetCore.Components.UIKeyboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeypress", typeof(Microsoft.AspNetCore.Components.UIKeyboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onkeyup", typeof(Microsoft.AspNetCore.Components.UIKeyboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onload", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadeddata", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadedmetadata", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadend", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onloadstart", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onlostpointercapture", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousedown", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousemove", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseout", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseover", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmouseup", typeof(Microsoft.AspNetCore.Components.UIMouseEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onmousewheel", typeof(Microsoft.AspNetCore.Components.UIWheelEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpaste", typeof(Microsoft.AspNetCore.Components.UIClipboardEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpause", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onplay", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onplaying", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointercancel", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerdown", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerenter", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerleave", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerlockchange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerlockerror", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointermove", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerout", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerover", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onpointerup", typeof(Microsoft.AspNetCore.Components.UIPointerEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onprogress", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onratechange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onreadystatechange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onreset", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onscroll", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onseeked", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onseeking", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselect", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselectionchange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onselectstart", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onstalled", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onstop", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onsubmit", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onsuspend", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontimeout", typeof(Microsoft.AspNetCore.Components.UIProgressEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontimeupdate", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchcancel", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchend", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchenter", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchleave", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchmove", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("ontouchstart", typeof(Microsoft.AspNetCore.Components.UITouchEventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onvolumechange", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onwaiting", typeof(System.EventArgs))] + [Microsoft.AspNetCore.Components.EventHandlerAttribute("onwheel", typeof(Microsoft.AspNetCore.Components.UIWheelEventArgs))] + public static partial class EventHandlers + { + } + public partial class UIClipboardEventArgs : System.EventArgs + { + public UIClipboardEventArgs() { } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIDataTransferItem + { + public UIDataTransferItem() { } + public string Kind { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIDragEventArgs : Microsoft.AspNetCore.Components.UIMouseEventArgs + { + public UIDragEventArgs() { } + public Microsoft.AspNetCore.Components.DataTransfer DataTransfer { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIErrorEventArgs : System.EventArgs + { + public UIErrorEventArgs() { } + public int Colno { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Filename { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public int Lineno { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Message { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIFocusEventArgs : System.EventArgs + { + public UIFocusEventArgs() { } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIKeyboardEventArgs : System.EventArgs + { + public UIKeyboardEventArgs() { } + public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Code { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Key { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool Repeat { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIMouseEventArgs : System.EventArgs + { + public UIMouseEventArgs() { } + public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Button { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Buttons { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ClientX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ClientY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Detail { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ScreenX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ScreenY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIPointerEventArgs : Microsoft.AspNetCore.Components.UIMouseEventArgs + { + public UIPointerEventArgs() { } + public float Height { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool IsPrimary { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long PointerId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string PointerType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float Pressure { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float TiltX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float TiltY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public float Width { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIProgressEventArgs : System.EventArgs + { + public UIProgressEventArgs() { } + public bool LengthComputable { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Loaded { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Total { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UITouchEventArgs : System.EventArgs + { + public UITouchEventArgs() { } + public bool AltKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Components.UITouchPoint[] ChangedTouches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool CtrlKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Detail { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool MetaKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool ShiftKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Components.UITouchPoint[] TargetTouches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Components.UITouchPoint[] Touches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UITouchPoint + { + public UITouchPoint() { } + public double ClientX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ClientY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public long Identifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double PageX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double PageY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ScreenX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double ScreenY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class UIWheelEventArgs : Microsoft.AspNetCore.Components.UIMouseEventArgs + { + public UIWheelEventArgs() { } + public long DeltaMode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double DeltaX { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double DeltaY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public double DeltaZ { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public static partial class WebEventCallbackFactoryUIEventArgsExtensions + { + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) { throw null; } + } +} +namespace Microsoft.AspNetCore.Components.Forms +{ + public static partial class EditContextFieldClassExtensions + { + public static string FieldCssClass(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } + public static string FieldCssClass(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, System.Linq.Expressions.Expression> accessor) { throw null; } + } + public partial class EditForm : Microsoft.AspNetCore.Components.ComponentBase + { + public EditForm() { } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.Forms.EditContext EditContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.EventCallback OnInvalidSubmit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.EventCallback OnSubmit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.EventCallback OnValidSubmit { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override void OnParametersSet() { } + } + public abstract partial class InputBase : Microsoft.AspNetCore.Components.ComponentBase + { + protected InputBase() { } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected string CssClass { get { throw null; } } + protected TValue CurrentValue { get { throw null; } set { } } + protected string CurrentValueAsString { get { throw null; } set { } } + protected Microsoft.AspNetCore.Components.Forms.EditContext EditContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public TValue Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.EventCallback ValueChanged { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public System.Linq.Expressions.Expression> ValueExpression { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected virtual string FormatValueAsString(TValue value) { throw null; } + public override System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; } + protected abstract bool TryParseValueFromString(string value, out TValue result, out string validationErrorMessage); + } + public partial class InputCheckbox : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputCheckbox() { } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override bool TryParseValueFromString(string value, out bool result, out string validationErrorMessage) { throw null; } + } + public partial class InputDate : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputDate() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string ParsingErrorMessage { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override string FormatValueAsString(TValue value) { throw null; } + protected override bool TryParseValueFromString(string value, out TValue result, out string validationErrorMessage) { throw null; } + } + public partial class InputNumber : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputNumber() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string ParsingErrorMessage { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override string FormatValueAsString(TValue value) { throw null; } + protected override bool TryParseValueFromString(string value, out TValue result, out string validationErrorMessage) { throw null; } + } + public partial class InputSelect : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputSelect() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override bool TryParseValueFromString(string value, out TValue result, out string validationErrorMessage) { throw null; } + } + public partial class InputText : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputText() { } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override bool TryParseValueFromString(string value, out string result, out string validationErrorMessage) { throw null; } + } + public partial class InputTextArea : Microsoft.AspNetCore.Components.Forms.InputBase + { + public InputTextArea() { } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override bool TryParseValueFromString(string value, out string result, out string validationErrorMessage) { throw null; } + } + public partial class ValidationMessage : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public ValidationMessage() { } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public System.Linq.Expressions.Expression> For { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected virtual void Dispose(bool disposing) { } + protected override void OnParametersSet() { } + void System.IDisposable.Dispose() { } + } + public partial class ValidationSummary : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public ValidationSummary() { } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected virtual void Dispose(bool disposing) { } + protected override void OnParametersSet() { } + void System.IDisposable.Dispose() { } + } +} +namespace Microsoft.AspNetCore.Components.Routing +{ + public partial class NavLink : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public NavLink() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string ActiveClass { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute(CaptureUnmatchedValues=true)] + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected string CssClass { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.Routing.NavLinkMatch Match { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + public void Dispose() { } + protected override void OnInitialized() { } + protected override void OnParametersSet() { } + } + public enum NavLinkMatch + { + Prefix = 0, + All = 1, + } +} +namespace Microsoft.AspNetCore.Components.Web +{ + public sealed partial class WebEventDescriptor + { + public WebEventDescriptor() { } + public int BrowserRendererId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string EventArgsType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Components.Rendering.EventFieldInfo EventFieldInfo { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public ulong EventHandlerId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } +} diff --git a/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj b/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj index 59c78672b1..e4beb19b3a 100644 --- a/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj +++ b/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj @@ -1,7 +1,8 @@ - netstandard2.0 + netstandard2.0;netcoreapp3.0 + netcoreapp3.0 true Support for rendering ASP.NET Core components for browsers. true diff --git a/src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.csproj b/src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.csproj index f9c576c501..2a41fa1e75 100644 --- a/src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.csproj +++ b/src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.0;netcoreapp3.0 @@ -15,4 +15,15 @@ + + + + + + + + + + + diff --git a/src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.netcoreapp3.0.cs b/src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.netcoreapp3.0.cs new file mode 100644 index 0000000000..70cd9bfe67 --- /dev/null +++ b/src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.netcoreapp3.0.cs @@ -0,0 +1,423 @@ +// 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. + +namespace Microsoft.AspNetCore.DataProtection +{ + public static partial class DataProtectionBuilderExtensions + { + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder AddKeyEscrowSink(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, Microsoft.AspNetCore.DataProtection.KeyManagement.IKeyEscrowSink sink) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder AddKeyEscrowSink(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Func factory) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder AddKeyEscrowSink(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder) where TImplementation : class, Microsoft.AspNetCore.DataProtection.KeyManagement.IKeyEscrowSink { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder AddKeyManagementOptions(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Action setupAction) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder DisableAutomaticKeyGeneration(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder PersistKeysToFileSystem(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.IO.DirectoryInfo directory) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder PersistKeysToRegistry(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, Microsoft.Win32.RegistryKey registryKey) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithCertificate(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithCertificate(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string thumbprint) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithDpapi(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithDpapi(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, bool protectToLocalMachine) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithDpapiNG(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithDpapiNG(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string protectionDescriptorRule, Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiNGProtectionDescriptorFlags flags) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder SetApplicationName(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string applicationName) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder SetDefaultKeyLifetime(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.TimeSpan lifetime) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder UnprotectKeysWithAnyCertificate(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, params System.Security.Cryptography.X509Certificates.X509Certificate2[] certificates) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder UseCryptographicAlgorithms(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorConfiguration configuration) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder UseCustomCryptographicAlgorithms(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.CngCbcAuthenticatedEncryptorConfiguration configuration) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder UseCustomCryptographicAlgorithms(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.CngGcmAuthenticatedEncryptorConfiguration configuration) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder UseCustomCryptographicAlgorithms(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.ManagedAuthenticatedEncryptorConfiguration configuration) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder UseEphemeralDataProtectionProvider(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder) { throw null; } + } + public partial class DataProtectionOptions + { + public DataProtectionOptions() { } + public string ApplicationDiscriminator { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public static partial class DataProtectionUtilityExtensions + { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static string GetApplicationUniqueIdentifier(this System.IServiceProvider services) { throw null; } + } + public sealed partial class EphemeralDataProtectionProvider : Microsoft.AspNetCore.DataProtection.IDataProtectionProvider + { + public EphemeralDataProtectionProvider() { } + public EphemeralDataProtectionProvider(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } + public Microsoft.AspNetCore.DataProtection.IDataProtector CreateProtector(string purpose) { throw null; } + } + public partial interface IDataProtectionBuilder + { + Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } + } + public partial interface IPersistedDataProtector : Microsoft.AspNetCore.DataProtection.IDataProtectionProvider, Microsoft.AspNetCore.DataProtection.IDataProtector + { + byte[] DangerousUnprotect(byte[] protectedData, bool ignoreRevocationErrors, out bool requiresMigration, out bool wasRevoked); + } + public partial interface ISecret : System.IDisposable + { + int Length { get; } + void WriteSecretIntoBuffer(System.ArraySegment buffer); + } + public sealed partial class Secret : Microsoft.AspNetCore.DataProtection.ISecret, System.IDisposable + { + public Secret(Microsoft.AspNetCore.DataProtection.ISecret secret) { } + public Secret(System.ArraySegment value) { } + public unsafe Secret(byte* secret, int secretLength) { } + public Secret(byte[] value) { } + public int Length { get { throw null; } } + public void Dispose() { } + public static Microsoft.AspNetCore.DataProtection.Secret Random(int numBytes) { throw null; } + public void WriteSecretIntoBuffer(System.ArraySegment buffer) { } + public unsafe void WriteSecretIntoBuffer(byte* buffer, int bufferLength) { } + } +} +namespace Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption +{ + public sealed partial class AuthenticatedEncryptorFactory : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptorFactory + { + public AuthenticatedEncryptorFactory(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor CreateEncryptorInstance(Microsoft.AspNetCore.DataProtection.KeyManagement.IKey key) { throw null; } + } + public sealed partial class CngCbcAuthenticatedEncryptorFactory : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptorFactory + { + public CngCbcAuthenticatedEncryptorFactory(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor CreateEncryptorInstance(Microsoft.AspNetCore.DataProtection.KeyManagement.IKey key) { throw null; } + } + public sealed partial class CngGcmAuthenticatedEncryptorFactory : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptorFactory + { + public CngGcmAuthenticatedEncryptorFactory(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor CreateEncryptorInstance(Microsoft.AspNetCore.DataProtection.KeyManagement.IKey key) { throw null; } + } + public enum EncryptionAlgorithm + { + AES_128_CBC = 0, + AES_192_CBC = 1, + AES_256_CBC = 2, + AES_128_GCM = 3, + AES_192_GCM = 4, + AES_256_GCM = 5, + } + public partial interface IAuthenticatedEncryptor + { + byte[] Decrypt(System.ArraySegment ciphertext, System.ArraySegment additionalAuthenticatedData); + byte[] Encrypt(System.ArraySegment plaintext, System.ArraySegment additionalAuthenticatedData); + } + public partial interface IAuthenticatedEncryptorFactory + { + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor CreateEncryptorInstance(Microsoft.AspNetCore.DataProtection.KeyManagement.IKey key); + } + public sealed partial class ManagedAuthenticatedEncryptorFactory : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptorFactory + { + public ManagedAuthenticatedEncryptorFactory(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor CreateEncryptorInstance(Microsoft.AspNetCore.DataProtection.KeyManagement.IKey key) { throw null; } + } + public enum ValidationAlgorithm + { + HMACSHA256 = 0, + HMACSHA512 = 1, + } +} +namespace Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel +{ + public abstract partial class AlgorithmConfiguration + { + protected AlgorithmConfiguration() { } + public abstract Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor CreateNewDescriptor(); + } + public sealed partial class AuthenticatedEncryptorConfiguration : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AlgorithmConfiguration + { + public AuthenticatedEncryptorConfiguration() { } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.EncryptionAlgorithm EncryptionAlgorithm { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ValidationAlgorithm ValidationAlgorithm { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public override Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor CreateNewDescriptor() { throw null; } + } + public sealed partial class AuthenticatedEncryptorDescriptor : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor + { + public AuthenticatedEncryptorDescriptor(Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorConfiguration configuration, Microsoft.AspNetCore.DataProtection.ISecret masterKey) { } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.XmlSerializedDescriptorInfo ExportToXml() { throw null; } + } + public sealed partial class AuthenticatedEncryptorDescriptorDeserializer : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptorDeserializer + { + public AuthenticatedEncryptorDescriptorDeserializer() { } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor ImportFromXml(System.Xml.Linq.XElement element) { throw null; } + } + public sealed partial class CngCbcAuthenticatedEncryptorConfiguration : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AlgorithmConfiguration + { + public CngCbcAuthenticatedEncryptorConfiguration() { } + public string EncryptionAlgorithm { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public int EncryptionAlgorithmKeySize { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string EncryptionAlgorithmProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string HashAlgorithm { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string HashAlgorithmProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public override Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor CreateNewDescriptor() { throw null; } + } + public sealed partial class CngCbcAuthenticatedEncryptorDescriptor : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor + { + public CngCbcAuthenticatedEncryptorDescriptor(Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.CngCbcAuthenticatedEncryptorConfiguration configuration, Microsoft.AspNetCore.DataProtection.ISecret masterKey) { } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.XmlSerializedDescriptorInfo ExportToXml() { throw null; } + } + public sealed partial class CngCbcAuthenticatedEncryptorDescriptorDeserializer : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptorDeserializer + { + public CngCbcAuthenticatedEncryptorDescriptorDeserializer() { } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor ImportFromXml(System.Xml.Linq.XElement element) { throw null; } + } + public sealed partial class CngGcmAuthenticatedEncryptorConfiguration : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AlgorithmConfiguration + { + public CngGcmAuthenticatedEncryptorConfiguration() { } + public string EncryptionAlgorithm { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public int EncryptionAlgorithmKeySize { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string EncryptionAlgorithmProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public override Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor CreateNewDescriptor() { throw null; } + } + public sealed partial class CngGcmAuthenticatedEncryptorDescriptor : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor + { + public CngGcmAuthenticatedEncryptorDescriptor(Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.CngGcmAuthenticatedEncryptorConfiguration configuration, Microsoft.AspNetCore.DataProtection.ISecret masterKey) { } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.XmlSerializedDescriptorInfo ExportToXml() { throw null; } + } + public sealed partial class CngGcmAuthenticatedEncryptorDescriptorDeserializer : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptorDeserializer + { + public CngGcmAuthenticatedEncryptorDescriptorDeserializer() { } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor ImportFromXml(System.Xml.Linq.XElement element) { throw null; } + } + public partial interface IAuthenticatedEncryptorDescriptor + { + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.XmlSerializedDescriptorInfo ExportToXml(); + } + public partial interface IAuthenticatedEncryptorDescriptorDeserializer + { + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor ImportFromXml(System.Xml.Linq.XElement element); + } + public sealed partial class ManagedAuthenticatedEncryptorConfiguration : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AlgorithmConfiguration + { + public ManagedAuthenticatedEncryptorConfiguration() { } + public int EncryptionAlgorithmKeySize { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public System.Type EncryptionAlgorithmType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public System.Type ValidationAlgorithmType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public override Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor CreateNewDescriptor() { throw null; } + } + public sealed partial class ManagedAuthenticatedEncryptorDescriptor : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor + { + public ManagedAuthenticatedEncryptorDescriptor(Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.ManagedAuthenticatedEncryptorConfiguration configuration, Microsoft.AspNetCore.DataProtection.ISecret masterKey) { } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.XmlSerializedDescriptorInfo ExportToXml() { throw null; } + } + public sealed partial class ManagedAuthenticatedEncryptorDescriptorDeserializer : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptorDeserializer + { + public ManagedAuthenticatedEncryptorDescriptorDeserializer() { } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor ImportFromXml(System.Xml.Linq.XElement element) { throw null; } + } + public static partial class XmlExtensions + { + public static void MarkAsRequiresEncryption(this System.Xml.Linq.XElement element) { } + } + public sealed partial class XmlSerializedDescriptorInfo + { + public XmlSerializedDescriptorInfo(System.Xml.Linq.XElement serializedDescriptorElement, System.Type deserializerType) { } + public System.Type DeserializerType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Xml.Linq.XElement SerializedDescriptorElement { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } +} +namespace Microsoft.AspNetCore.DataProtection.Internal +{ + public partial interface IActivator + { + object CreateInstance(System.Type expectedBaseType, string implementationTypeName); + } +} +namespace Microsoft.AspNetCore.DataProtection.KeyManagement +{ + public partial interface IKey + { + System.DateTimeOffset ActivationDate { get; } + System.DateTimeOffset CreationDate { get; } + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor Descriptor { get; } + System.DateTimeOffset ExpirationDate { get; } + bool IsRevoked { get; } + System.Guid KeyId { get; } + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor CreateEncryptor(); + } + public partial interface IKeyEscrowSink + { + void Store(System.Guid keyId, System.Xml.Linq.XElement element); + } + public partial interface IKeyManager + { + Microsoft.AspNetCore.DataProtection.KeyManagement.IKey CreateNewKey(System.DateTimeOffset activationDate, System.DateTimeOffset expirationDate); + System.Collections.Generic.IReadOnlyCollection GetAllKeys(); + System.Threading.CancellationToken GetCacheExpirationToken(); + void RevokeAllKeys(System.DateTimeOffset revocationDate, string reason = null); + void RevokeKey(System.Guid keyId, string reason = null); + } + public partial class KeyManagementOptions + { + public KeyManagementOptions() { } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AlgorithmConfiguration AuthenticatedEncryptorConfiguration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public System.Collections.Generic.IList AuthenticatedEncryptorFactories { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public bool AutoGenerateKeys { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public System.Collections.Generic.IList KeyEscrowSinks { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.TimeSpan NewKeyLifetime { get { throw null; } set { } } + public Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlEncryptor XmlEncryptor { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.DataProtection.Repositories.IXmlRepository XmlRepository { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public sealed partial class XmlKeyManager : Microsoft.AspNetCore.DataProtection.KeyManagement.IKeyManager, Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IInternalXmlKeyManager + { + public XmlKeyManager(Microsoft.Extensions.Options.IOptions keyManagementOptions, Microsoft.AspNetCore.DataProtection.Internal.IActivator activator) { } + public XmlKeyManager(Microsoft.Extensions.Options.IOptions keyManagementOptions, Microsoft.AspNetCore.DataProtection.Internal.IActivator activator, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } + public Microsoft.AspNetCore.DataProtection.KeyManagement.IKey CreateNewKey(System.DateTimeOffset activationDate, System.DateTimeOffset expirationDate) { throw null; } + public System.Collections.Generic.IReadOnlyCollection GetAllKeys() { throw null; } + public System.Threading.CancellationToken GetCacheExpirationToken() { throw null; } + Microsoft.AspNetCore.DataProtection.KeyManagement.IKey Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IInternalXmlKeyManager.CreateNewKey(System.Guid keyId, System.DateTimeOffset creationDate, System.DateTimeOffset activationDate, System.DateTimeOffset expirationDate) { throw null; } + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IInternalXmlKeyManager.DeserializeDescriptorFromKeyElement(System.Xml.Linq.XElement keyElement) { throw null; } + void Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IInternalXmlKeyManager.RevokeSingleKey(System.Guid keyId, System.DateTimeOffset revocationDate, string reason) { } + public void RevokeAllKeys(System.DateTimeOffset revocationDate, string reason = null) { } + public void RevokeKey(System.Guid keyId, string reason = null) { } + } +} +namespace Microsoft.AspNetCore.DataProtection.KeyManagement.Internal +{ + public sealed partial class CacheableKeyRing + { + internal CacheableKeyRing() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public partial struct DefaultKeyResolution + { + public Microsoft.AspNetCore.DataProtection.KeyManagement.IKey DefaultKey; + public Microsoft.AspNetCore.DataProtection.KeyManagement.IKey FallbackKey; + public bool ShouldGenerateNewKey; + } + public partial interface ICacheableKeyRingProvider + { + Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.CacheableKeyRing GetCacheableKeyRing(System.DateTimeOffset now); + } + public partial interface IDefaultKeyResolver + { + Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.DefaultKeyResolution ResolveDefaultKeyPolicy(System.DateTimeOffset now, System.Collections.Generic.IEnumerable allKeys); + } + public partial interface IInternalXmlKeyManager + { + Microsoft.AspNetCore.DataProtection.KeyManagement.IKey CreateNewKey(System.Guid keyId, System.DateTimeOffset creationDate, System.DateTimeOffset activationDate, System.DateTimeOffset expirationDate); + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor DeserializeDescriptorFromKeyElement(System.Xml.Linq.XElement keyElement); + void RevokeSingleKey(System.Guid keyId, System.DateTimeOffset revocationDate, string reason); + } + public partial interface IKeyRing + { + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor DefaultAuthenticatedEncryptor { get; } + System.Guid DefaultKeyId { get; } + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor GetAuthenticatedEncryptorByKeyId(System.Guid keyId, out bool isRevoked); + } + public partial interface IKeyRingProvider + { + Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IKeyRing GetCurrentKeyRing(); + } +} +namespace Microsoft.AspNetCore.DataProtection.Repositories +{ + public partial class FileSystemXmlRepository : Microsoft.AspNetCore.DataProtection.Repositories.IXmlRepository + { + public FileSystemXmlRepository(System.IO.DirectoryInfo directory, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } + public static System.IO.DirectoryInfo DefaultKeyStorageDirectory { get { throw null; } } + public System.IO.DirectoryInfo Directory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public virtual System.Collections.Generic.IReadOnlyCollection GetAllElements() { throw null; } + public virtual void StoreElement(System.Xml.Linq.XElement element, string friendlyName) { } + } + public partial interface IXmlRepository + { + System.Collections.Generic.IReadOnlyCollection GetAllElements(); + void StoreElement(System.Xml.Linq.XElement element, string friendlyName); + } + public partial class RegistryXmlRepository : Microsoft.AspNetCore.DataProtection.Repositories.IXmlRepository + { + public RegistryXmlRepository(Microsoft.Win32.RegistryKey registryKey, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } + public static Microsoft.Win32.RegistryKey DefaultRegistryKey { get { throw null; } } + public Microsoft.Win32.RegistryKey RegistryKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public virtual System.Collections.Generic.IReadOnlyCollection GetAllElements() { throw null; } + public virtual void StoreElement(System.Xml.Linq.XElement element, string friendlyName) { } + } +} +namespace Microsoft.AspNetCore.DataProtection.XmlEncryption +{ + public partial class CertificateResolver : Microsoft.AspNetCore.DataProtection.XmlEncryption.ICertificateResolver + { + public CertificateResolver() { } + public virtual System.Security.Cryptography.X509Certificates.X509Certificate2 ResolveCertificate(string thumbprint) { throw null; } + } + public sealed partial class CertificateXmlEncryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlEncryptor + { + public CertificateXmlEncryptor(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } + public CertificateXmlEncryptor(string thumbprint, Microsoft.AspNetCore.DataProtection.XmlEncryption.ICertificateResolver certificateResolver, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } + public Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlInfo Encrypt(System.Xml.Linq.XElement plaintextElement) { throw null; } + } + [System.FlagsAttribute] + public enum DpapiNGProtectionDescriptorFlags + { + None = 0, + NamedDescriptor = 1, + MachineKey = 32, + } + public sealed partial class DpapiNGXmlDecryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlDecryptor + { + public DpapiNGXmlDecryptor() { } + public DpapiNGXmlDecryptor(System.IServiceProvider services) { } + public System.Xml.Linq.XElement Decrypt(System.Xml.Linq.XElement encryptedElement) { throw null; } + } + public sealed partial class DpapiNGXmlEncryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlEncryptor + { + public DpapiNGXmlEncryptor(string protectionDescriptorRule, Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiNGProtectionDescriptorFlags flags, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } + public Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlInfo Encrypt(System.Xml.Linq.XElement plaintextElement) { throw null; } + } + public sealed partial class DpapiXmlDecryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlDecryptor + { + public DpapiXmlDecryptor() { } + public DpapiXmlDecryptor(System.IServiceProvider services) { } + public System.Xml.Linq.XElement Decrypt(System.Xml.Linq.XElement encryptedElement) { throw null; } + } + public sealed partial class DpapiXmlEncryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlEncryptor + { + public DpapiXmlEncryptor(bool protectToLocalMachine, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } + public Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlInfo Encrypt(System.Xml.Linq.XElement plaintextElement) { throw null; } + } + public sealed partial class EncryptedXmlDecryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlDecryptor + { + public EncryptedXmlDecryptor() { } + public EncryptedXmlDecryptor(System.IServiceProvider services) { } + public System.Xml.Linq.XElement Decrypt(System.Xml.Linq.XElement encryptedElement) { throw null; } + } + public sealed partial class EncryptedXmlInfo + { + public EncryptedXmlInfo(System.Xml.Linq.XElement encryptedElement, System.Type decryptorType) { } + public System.Type DecryptorType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Xml.Linq.XElement EncryptedElement { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public partial interface ICertificateResolver + { + System.Security.Cryptography.X509Certificates.X509Certificate2 ResolveCertificate(string thumbprint); + } + public partial interface IXmlDecryptor + { + System.Xml.Linq.XElement Decrypt(System.Xml.Linq.XElement encryptedElement); + } + public partial interface IXmlEncryptor + { + Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlInfo Encrypt(System.Xml.Linq.XElement plaintextElement); + } + public sealed partial class NullXmlDecryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlDecryptor + { + public NullXmlDecryptor() { } + public System.Xml.Linq.XElement Decrypt(System.Xml.Linq.XElement encryptedElement) { throw null; } + } + public sealed partial class NullXmlEncryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlEncryptor + { + public NullXmlEncryptor() { } + public NullXmlEncryptor(System.IServiceProvider services) { } + public Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlInfo Encrypt(System.Xml.Linq.XElement plaintextElement) { throw null; } + } +} +namespace Microsoft.Extensions.DependencyInjection +{ + public static partial class DataProtectionServiceCollectionExtensions + { + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder AddDataProtection(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder AddDataProtection(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action setupAction) { throw null; } + } +} diff --git a/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj b/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj index 1c5f507cc2..57127419bd 100644 --- a/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj +++ b/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj @@ -2,7 +2,8 @@ ASP.NET Core logic to protect and unprotect data, similar to DPAPI. - netstandard2.0 + netstandard2.0;netcoreapp3.0 + netcoreapp3.0 true true $(NoWarn);CS1591 @@ -24,6 +25,9 @@ + + + diff --git a/src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.csproj b/src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.csproj index 82cadaff7a..32b774090f 100644 --- a/src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.csproj +++ b/src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.csproj @@ -1,11 +1,16 @@ - netstandard2.0 + netstandard2.0;netcoreapp3.0 + + + + + diff --git a/src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.netcoreapp3.0.cs b/src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.netcoreapp3.0.cs new file mode 100644 index 0000000000..c9de46a592 --- /dev/null +++ b/src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.netcoreapp3.0.cs @@ -0,0 +1,29 @@ +// 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. + +namespace Microsoft.AspNetCore.DataProtection +{ + public static partial class DataProtectionAdvancedExtensions + { + public static byte[] Protect(this Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector protector, byte[] plaintext, System.TimeSpan lifetime) { throw null; } + public static string Protect(this Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector protector, string plaintext, System.DateTimeOffset expiration) { throw null; } + public static string Protect(this Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector protector, string plaintext, System.TimeSpan lifetime) { throw null; } + public static Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector ToTimeLimitedDataProtector(this Microsoft.AspNetCore.DataProtection.IDataProtector protector) { throw null; } + public static string Unprotect(this Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector protector, string protectedData, out System.DateTimeOffset expiration) { throw null; } + } + public static partial class DataProtectionProvider + { + public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create(System.IO.DirectoryInfo keyDirectory) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create(System.IO.DirectoryInfo keyDirectory, System.Action setupAction) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create(System.IO.DirectoryInfo keyDirectory, System.Action setupAction, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create(System.IO.DirectoryInfo keyDirectory, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create(string applicationName) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create(string applicationName, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) { throw null; } + } + public partial interface ITimeLimitedDataProtector : Microsoft.AspNetCore.DataProtection.IDataProtectionProvider, Microsoft.AspNetCore.DataProtection.IDataProtector + { + new Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector CreateProtector(string purpose); + byte[] Protect(byte[] plaintext, System.DateTimeOffset expiration); + byte[] Unprotect(byte[] protectedData, out System.DateTimeOffset expiration); + } +} diff --git a/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj b/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj index 1a0a65d3fa..b3098cbf72 100644 --- a/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj +++ b/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj @@ -2,7 +2,8 @@ Additional APIs for ASP.NET Core data protection. - netstandard2.0 + netstandard2.0;netcoreapp3.0 + netcoreapp3.0 true true true diff --git a/src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.csproj b/src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.csproj index 26f7fe8018..1e342f6be0 100644 --- a/src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.csproj +++ b/src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.csproj @@ -1,11 +1,16 @@ - netstandard2.0 + netstandard2.0;netcoreapp3.0 + + + + + diff --git a/src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.netcoreapp3.0.cs b/src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.netcoreapp3.0.cs new file mode 100644 index 0000000000..a7327d08fc --- /dev/null +++ b/src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.netcoreapp3.0.cs @@ -0,0 +1,309 @@ +// 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. + +namespace Microsoft.AspNetCore.Http +{ + public partial class CookieOptions + { + public CookieOptions() { } + public string Domain { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public System.DateTimeOffset? Expires { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool HttpOnly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool IsEssential { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public System.TimeSpan? MaxAge { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Path { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Http.SameSiteMode SameSite { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool Secure { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial interface IFormCollection : System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable + { + int Count { get; } + Microsoft.AspNetCore.Http.IFormFileCollection Files { get; } + Microsoft.Extensions.Primitives.StringValues this[string key] { get; } + System.Collections.Generic.ICollection Keys { get; } + bool ContainsKey(string key); + bool TryGetValue(string key, out Microsoft.Extensions.Primitives.StringValues value); + } + public partial interface IFormFile + { + string ContentDisposition { get; } + string ContentType { get; } + string FileName { get; } + Microsoft.AspNetCore.Http.IHeaderDictionary Headers { get; } + long Length { get; } + string Name { get; } + void CopyTo(System.IO.Stream target); + System.Threading.Tasks.Task CopyToAsync(System.IO.Stream target, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.IO.Stream OpenReadStream(); + } + public partial interface IFormFileCollection : System.Collections.Generic.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IReadOnlyList, System.Collections.IEnumerable + { + Microsoft.AspNetCore.Http.IFormFile this[string name] { get; } + Microsoft.AspNetCore.Http.IFormFile GetFile(string name); + System.Collections.Generic.IReadOnlyList GetFiles(string name); + } + public partial interface IHeaderDictionary : System.Collections.Generic.ICollection>, System.Collections.Generic.IDictionary, System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable + { + long? ContentLength { get; set; } + new Microsoft.Extensions.Primitives.StringValues this[string key] { get; set; } + } + public partial interface IQueryCollection : System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable + { + int Count { get; } + Microsoft.Extensions.Primitives.StringValues this[string key] { get; } + System.Collections.Generic.ICollection Keys { get; } + bool ContainsKey(string key); + bool TryGetValue(string key, out Microsoft.Extensions.Primitives.StringValues value); + } + public partial interface IRequestCookieCollection : System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable + { + int Count { get; } + string this[string key] { get; } + System.Collections.Generic.ICollection Keys { get; } + bool ContainsKey(string key); + bool TryGetValue(string key, out string value); + } + public partial interface IResponseCookies + { + void Append(string key, string value); + void Append(string key, string value, Microsoft.AspNetCore.Http.CookieOptions options); + void Delete(string key); + void Delete(string key, Microsoft.AspNetCore.Http.CookieOptions options); + } + public partial interface ISession + { + string Id { get; } + bool IsAvailable { get; } + System.Collections.Generic.IEnumerable Keys { get; } + void Clear(); + System.Threading.Tasks.Task CommitAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LoadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + void Remove(string key); + void Set(string key, byte[] value); + bool TryGetValue(string key, out byte[] value); + } + public enum SameSiteMode + { + None = 0, + Lax = 1, + Strict = 2, + } + public partial class WebSocketAcceptContext + { + public WebSocketAcceptContext() { } + public virtual string SubProtocol { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } +} +namespace Microsoft.AspNetCore.Http.Features +{ + public partial class FeatureCollection : Microsoft.AspNetCore.Http.Features.IFeatureCollection, System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable + { + public FeatureCollection() { } + public FeatureCollection(Microsoft.AspNetCore.Http.Features.IFeatureCollection defaults) { } + public bool IsReadOnly { get { throw null; } } + public object this[System.Type key] { get { throw null; } set { } } + public virtual int Revision { get { throw null; } } + public System.Collections.Generic.IEnumerator> GetEnumerator() { throw null; } + public TFeature Get() { throw null; } + public void Set(TFeature instance) { } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public partial struct FeatureReferences + { + private object _dummy; + private int _dummyPrimitive; + public TCache Cache; + public FeatureReferences(Microsoft.AspNetCore.Http.Features.IFeatureCollection collection) { throw null; } + public Microsoft.AspNetCore.Http.Features.IFeatureCollection Collection { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public int Revision { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public TFeature Fetch(ref TFeature cached, System.Func factory) where TFeature : class { throw null; } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public TFeature Fetch(ref TFeature cached, TState state, System.Func factory) where TFeature : class { throw null; } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public void Initalize(Microsoft.AspNetCore.Http.Features.IFeatureCollection collection) { } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public void Initalize(Microsoft.AspNetCore.Http.Features.IFeatureCollection collection, int revision) { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public partial struct FeatureReference + { + private T _feature; + private int _dummyPrimitive; + public static readonly Microsoft.AspNetCore.Http.Features.FeatureReference Default; + public T Fetch(Microsoft.AspNetCore.Http.Features.IFeatureCollection features) { throw null; } + public T Update(Microsoft.AspNetCore.Http.Features.IFeatureCollection features, T feature) { throw null; } + } + public enum HttpsCompressionMode + { + Default = 0, + DoNotCompress = 1, + Compress = 2, + } + public partial interface IFeatureCollection : System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable + { + bool IsReadOnly { get; } + object this[System.Type key] { get; set; } + int Revision { get; } + TFeature Get(); + void Set(TFeature instance); + } + public partial interface IFormFeature + { + Microsoft.AspNetCore.Http.IFormCollection Form { get; set; } + bool HasFormContentType { get; } + Microsoft.AspNetCore.Http.IFormCollection ReadForm(); + System.Threading.Tasks.Task ReadFormAsync(System.Threading.CancellationToken cancellationToken); + } + public partial interface IHttpBodyControlFeature + { + bool AllowSynchronousIO { get; set; } + } + [System.ObsoleteAttribute("See IHttpRequestBodyFeature or IHttpResponseBodyFeature DisableBuffering", true)] + public partial interface IHttpBufferingFeature + { + void DisableRequestBuffering(); + void DisableResponseBuffering(); + } + public partial interface IHttpConnectionFeature + { + string ConnectionId { get; set; } + System.Net.IPAddress LocalIpAddress { get; set; } + int LocalPort { get; set; } + System.Net.IPAddress RemoteIpAddress { get; set; } + int RemotePort { get; set; } + } + public partial interface IHttpMaxRequestBodySizeFeature + { + bool IsReadOnly { get; } + long? MaxRequestBodySize { get; set; } + } + public partial interface IHttpRequestFeature + { + System.IO.Stream Body { get; set; } + Microsoft.AspNetCore.Http.IHeaderDictionary Headers { get; set; } + string Method { get; set; } + string Path { get; set; } + string PathBase { get; set; } + string Protocol { get; set; } + string QueryString { get; set; } + string RawTarget { get; set; } + string Scheme { get; set; } + } + public partial interface IHttpRequestIdentifierFeature + { + string TraceIdentifier { get; set; } + } + public partial interface IHttpRequestLifetimeFeature + { + System.Threading.CancellationToken RequestAborted { get; set; } + void Abort(); + } + public partial interface IHttpRequestTrailersFeature + { + bool Available { get; } + Microsoft.AspNetCore.Http.IHeaderDictionary Trailers { get; } + } + public partial interface IHttpResetFeature + { + void Reset(int errorCode); + } + public partial interface IHttpResponseBodyFeature + { + System.IO.Stream Stream { get; } + System.IO.Pipelines.PipeWriter Writer { get; } + System.Threading.Tasks.Task CompleteAsync(); + void DisableBuffering(); + System.Threading.Tasks.Task SendFileAsync(string path, long offset, long? count, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task StartAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + public partial interface IHttpResponseFeature + { + [System.ObsoleteAttribute("Use IHttpResponseBodyFeature.Stream instead.", false)] + System.IO.Stream Body { get; set; } + bool HasStarted { get; } + Microsoft.AspNetCore.Http.IHeaderDictionary Headers { get; set; } + string ReasonPhrase { get; set; } + int StatusCode { get; set; } + void OnCompleted(System.Func callback, object state); + void OnStarting(System.Func callback, object state); + } + public partial interface IHttpResponseTrailersFeature + { + Microsoft.AspNetCore.Http.IHeaderDictionary Trailers { get; set; } + } + public partial interface IHttpsCompressionFeature + { + Microsoft.AspNetCore.Http.Features.HttpsCompressionMode Mode { get; set; } + } + [System.ObsoleteAttribute("Use IHttpResponseBodyFeature instead.", true)] + public partial interface IHttpSendFileFeature + { + System.Threading.Tasks.Task SendFileAsync(string path, long offset, long? count, System.Threading.CancellationToken cancellation); + } + public partial interface IHttpUpgradeFeature + { + bool IsUpgradableRequest { get; } + System.Threading.Tasks.Task UpgradeAsync(); + } + public partial interface IHttpWebSocketFeature + { + bool IsWebSocketRequest { get; } + System.Threading.Tasks.Task AcceptAsync(Microsoft.AspNetCore.Http.WebSocketAcceptContext context); + } + public partial interface IItemsFeature + { + System.Collections.Generic.IDictionary Items { get; set; } + } + public partial interface IQueryFeature + { + Microsoft.AspNetCore.Http.IQueryCollection Query { get; set; } + } + public partial interface IRequestBodyPipeFeature + { + System.IO.Pipelines.PipeReader Reader { get; } + } + public partial interface IRequestCookiesFeature + { + Microsoft.AspNetCore.Http.IRequestCookieCollection Cookies { get; set; } + } + public partial interface IResponseCookiesFeature + { + Microsoft.AspNetCore.Http.IResponseCookies Cookies { get; } + } + public partial interface IServerVariablesFeature + { + string this[string variableName] { get; set; } + } + public partial interface IServiceProvidersFeature + { + System.IServiceProvider RequestServices { get; set; } + } + public partial interface ISessionFeature + { + Microsoft.AspNetCore.Http.ISession Session { get; set; } + } + public partial interface ITlsConnectionFeature + { + System.Security.Cryptography.X509Certificates.X509Certificate2 ClientCertificate { get; set; } + System.Threading.Tasks.Task GetClientCertificateAsync(System.Threading.CancellationToken cancellationToken); + } + public partial interface ITlsTokenBindingFeature + { + byte[] GetProvidedTokenBindingId(); + byte[] GetReferredTokenBindingId(); + } + public partial interface ITrackingConsentFeature + { + bool CanTrack { get; } + bool HasConsent { get; } + bool IsConsentNeeded { get; } + string CreateConsentCookie(); + void GrantConsent(); + void WithdrawConsent(); + } +} +namespace Microsoft.AspNetCore.Http.Features.Authentication +{ + public partial interface IHttpAuthenticationFeature + { + System.Security.Claims.ClaimsPrincipal User { get; set; } + } +} diff --git a/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj b/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj index 4e052998c0..ef0453fde1 100644 --- a/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj +++ b/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj @@ -2,7 +2,8 @@ ASP.NET Core HTTP feature interface definitions. - netstandard2.0 + netstandard2.0;netcoreapp3.0 + netcoreapp3.0 true $(NoWarn);CS1591 true diff --git a/src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj b/src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj index 56f0243273..fec5c078c8 100644 --- a/src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj +++ b/src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj @@ -3,6 +3,7 @@ ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. ASP.NET Core Identity allows you to add login features to your application and makes it easy to customize data about the logged in user. netstandard2.0;netcoreapp3.0 + netcoreapp3.0 true true true diff --git a/src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.csproj b/src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.csproj index 77cdf717c7..7a0f728cb4 100644 --- a/src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.csproj +++ b/src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.csproj @@ -1,11 +1,16 @@ - netstandard2.0 + netstandard2.0;netcoreapp3.0 + + + + + diff --git a/src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.netcoreapp3.0.cs b/src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.netcoreapp3.0.cs new file mode 100644 index 0000000000..5ea5d5f233 --- /dev/null +++ b/src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.netcoreapp3.0.cs @@ -0,0 +1,210 @@ +// 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. + +namespace Microsoft.AspNetCore.Identity +{ + public partial class IdentityRole : Microsoft.AspNetCore.Identity.IdentityRole + { + public IdentityRole() { } + public IdentityRole(string roleName) { } + } + public partial class IdentityRoleClaim where TKey : System.IEquatable + { + public IdentityRoleClaim() { } + public virtual string ClaimType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual string ClaimValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual int Id { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual TKey RoleId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual void InitializeFromClaim(System.Security.Claims.Claim other) { } + public virtual System.Security.Claims.Claim ToClaim() { throw null; } + } + public partial class IdentityRole where TKey : System.IEquatable + { + public IdentityRole() { } + public IdentityRole(string roleName) { } + public virtual string ConcurrencyStamp { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual TKey Id { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual string NormalizedName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public override string ToString() { throw null; } + } + public partial class IdentityUser : Microsoft.AspNetCore.Identity.IdentityUser + { + public IdentityUser() { } + public IdentityUser(string userName) { } + } + public partial class IdentityUserClaim where TKey : System.IEquatable + { + public IdentityUserClaim() { } + public virtual string ClaimType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual string ClaimValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual int Id { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual TKey UserId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual void InitializeFromClaim(System.Security.Claims.Claim claim) { } + public virtual System.Security.Claims.Claim ToClaim() { throw null; } + } + public partial class IdentityUserLogin where TKey : System.IEquatable + { + public IdentityUserLogin() { } + public virtual string LoginProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual string ProviderDisplayName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual string ProviderKey { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual TKey UserId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class IdentityUserRole where TKey : System.IEquatable + { + public IdentityUserRole() { } + public virtual TKey RoleId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual TKey UserId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class IdentityUserToken where TKey : System.IEquatable + { + public IdentityUserToken() { } + public virtual string LoginProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual TKey UserId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Identity.ProtectedPersonalDataAttribute] + public virtual string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class IdentityUser where TKey : System.IEquatable + { + public IdentityUser() { } + public IdentityUser(string userName) { } + public virtual int AccessFailedCount { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual string ConcurrencyStamp { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Identity.ProtectedPersonalDataAttribute] + public virtual string Email { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Identity.PersonalDataAttribute] + public virtual bool EmailConfirmed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Identity.PersonalDataAttribute] + public virtual TKey Id { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual bool LockoutEnabled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual System.DateTimeOffset? LockoutEnd { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual string NormalizedEmail { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual string NormalizedUserName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual string PasswordHash { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Identity.ProtectedPersonalDataAttribute] + public virtual string PhoneNumber { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Identity.PersonalDataAttribute] + public virtual bool PhoneNumberConfirmed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual string SecurityStamp { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Identity.PersonalDataAttribute] + public virtual bool TwoFactorEnabled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Identity.ProtectedPersonalDataAttribute] + public virtual string UserName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public override string ToString() { throw null; } + } + public abstract partial class RoleStoreBase : Microsoft.AspNetCore.Identity.IQueryableRoleStore, Microsoft.AspNetCore.Identity.IRoleClaimStore, Microsoft.AspNetCore.Identity.IRoleStore, System.IDisposable where TRole : Microsoft.AspNetCore.Identity.IdentityRole where TKey : System.IEquatable where TUserRole : Microsoft.AspNetCore.Identity.IdentityUserRole, new() where TRoleClaim : Microsoft.AspNetCore.Identity.IdentityRoleClaim, new() + { + public RoleStoreBase(Microsoft.AspNetCore.Identity.IdentityErrorDescriber describer) { } + public Microsoft.AspNetCore.Identity.IdentityErrorDescriber ErrorDescriber { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public abstract System.Linq.IQueryable Roles { get; } + public abstract System.Threading.Tasks.Task AddClaimAsync(TRole role, System.Security.Claims.Claim claim, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual TKey ConvertIdFromString(string id) { throw null; } + public virtual string ConvertIdToString(TKey id) { throw null; } + public abstract System.Threading.Tasks.Task CreateAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected virtual TRoleClaim CreateRoleClaim(TRole role, System.Security.Claims.Claim claim) { throw null; } + public abstract System.Threading.Tasks.Task DeleteAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public void Dispose() { } + public abstract System.Threading.Tasks.Task FindByIdAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task FindByNameAsync(string normalizedName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task> GetClaimsAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual System.Threading.Tasks.Task GetNormalizedRoleNameAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetRoleIdAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetRoleNameAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public abstract System.Threading.Tasks.Task RemoveClaimAsync(TRole role, System.Security.Claims.Claim claim, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual System.Threading.Tasks.Task SetNormalizedRoleNameAsync(TRole role, string normalizedName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SetRoleNameAsync(TRole role, string roleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected void ThrowIfDisposed() { } + public abstract System.Threading.Tasks.Task UpdateAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + public abstract partial class UserStoreBase : Microsoft.AspNetCore.Identity.IQueryableUserStore, Microsoft.AspNetCore.Identity.IUserAuthenticationTokenStore, Microsoft.AspNetCore.Identity.IUserAuthenticatorKeyStore, Microsoft.AspNetCore.Identity.IUserClaimStore, Microsoft.AspNetCore.Identity.IUserEmailStore, Microsoft.AspNetCore.Identity.IUserLockoutStore, Microsoft.AspNetCore.Identity.IUserLoginStore, Microsoft.AspNetCore.Identity.IUserPasswordStore, Microsoft.AspNetCore.Identity.IUserPhoneNumberStore, Microsoft.AspNetCore.Identity.IUserSecurityStampStore, Microsoft.AspNetCore.Identity.IUserStore, Microsoft.AspNetCore.Identity.IUserTwoFactorRecoveryCodeStore, Microsoft.AspNetCore.Identity.IUserTwoFactorStore, System.IDisposable where TUser : Microsoft.AspNetCore.Identity.IdentityUser where TKey : System.IEquatable where TUserClaim : Microsoft.AspNetCore.Identity.IdentityUserClaim, new() where TUserLogin : Microsoft.AspNetCore.Identity.IdentityUserLogin, new() where TUserToken : Microsoft.AspNetCore.Identity.IdentityUserToken, new() + { + public UserStoreBase(Microsoft.AspNetCore.Identity.IdentityErrorDescriber describer) { } + public Microsoft.AspNetCore.Identity.IdentityErrorDescriber ErrorDescriber { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public abstract System.Linq.IQueryable Users { get; } + public abstract System.Threading.Tasks.Task AddClaimsAsync(TUser user, System.Collections.Generic.IEnumerable claims, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task AddLoginAsync(TUser user, Microsoft.AspNetCore.Identity.UserLoginInfo login, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected abstract System.Threading.Tasks.Task AddUserTokenAsync(TUserToken token); + public virtual TKey ConvertIdFromString(string id) { throw null; } + public virtual string ConvertIdToString(TKey id) { throw null; } + [System.Diagnostics.DebuggerStepThroughAttribute] + public virtual System.Threading.Tasks.Task CountCodesAsync(TUser user, System.Threading.CancellationToken cancellationToken) { throw null; } + public abstract System.Threading.Tasks.Task CreateAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected virtual TUserClaim CreateUserClaim(TUser user, System.Security.Claims.Claim claim) { throw null; } + protected virtual TUserLogin CreateUserLogin(TUser user, Microsoft.AspNetCore.Identity.UserLoginInfo login) { throw null; } + protected virtual TUserToken CreateUserToken(TUser user, string loginProvider, string name, string value) { throw null; } + public abstract System.Threading.Tasks.Task DeleteAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public void Dispose() { } + public abstract System.Threading.Tasks.Task FindByEmailAsync(string normalizedEmail, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task FindByIdAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [System.Diagnostics.DebuggerStepThroughAttribute] + public virtual System.Threading.Tasks.Task FindByLoginAsync(string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public abstract System.Threading.Tasks.Task FindByNameAsync(string normalizedUserName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected abstract System.Threading.Tasks.Task FindTokenAsync(TUser user, string loginProvider, string name, System.Threading.CancellationToken cancellationToken); + protected abstract System.Threading.Tasks.Task FindUserAsync(TKey userId, System.Threading.CancellationToken cancellationToken); + protected abstract System.Threading.Tasks.Task FindUserLoginAsync(string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken); + protected abstract System.Threading.Tasks.Task FindUserLoginAsync(TKey userId, string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken); + public virtual System.Threading.Tasks.Task GetAccessFailedCountAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAuthenticatorKeyAsync(TUser user, System.Threading.CancellationToken cancellationToken) { throw null; } + public abstract System.Threading.Tasks.Task> GetClaimsAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual System.Threading.Tasks.Task GetEmailAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetEmailConfirmedAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLockoutEnabledAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLockoutEndDateAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public abstract System.Threading.Tasks.Task> GetLoginsAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual System.Threading.Tasks.Task GetNormalizedEmailAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetNormalizedUserNameAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetPasswordHashAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetPhoneNumberAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetPhoneNumberConfirmedAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSecurityStampAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.Diagnostics.DebuggerStepThroughAttribute] + public virtual System.Threading.Tasks.Task GetTokenAsync(TUser user, string loginProvider, string name, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task GetTwoFactorEnabledAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetUserIdAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetUserNameAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public abstract System.Threading.Tasks.Task> GetUsersForClaimAsync(System.Security.Claims.Claim claim, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual System.Threading.Tasks.Task HasPasswordAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task IncrementAccessFailedCountAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.Diagnostics.DebuggerStepThroughAttribute] + public virtual System.Threading.Tasks.Task RedeemCodeAsync(TUser user, string code, System.Threading.CancellationToken cancellationToken) { throw null; } + public abstract System.Threading.Tasks.Task RemoveClaimsAsync(TUser user, System.Collections.Generic.IEnumerable claims, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task RemoveLoginAsync(TUser user, string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [System.Diagnostics.DebuggerStepThroughAttribute] + public virtual System.Threading.Tasks.Task RemoveTokenAsync(TUser user, string loginProvider, string name, System.Threading.CancellationToken cancellationToken) { throw null; } + protected abstract System.Threading.Tasks.Task RemoveUserTokenAsync(TUserToken token); + public abstract System.Threading.Tasks.Task ReplaceClaimAsync(TUser user, System.Security.Claims.Claim claim, System.Security.Claims.Claim newClaim, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual System.Threading.Tasks.Task ReplaceCodesAsync(TUser user, System.Collections.Generic.IEnumerable recoveryCodes, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task ResetAccessFailedCountAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SetAuthenticatorKeyAsync(TUser user, string key, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task SetEmailAsync(TUser user, string email, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SetEmailConfirmedAsync(TUser user, bool confirmed, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SetLockoutEnabledAsync(TUser user, bool enabled, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SetLockoutEndDateAsync(TUser user, System.DateTimeOffset? lockoutEnd, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SetNormalizedEmailAsync(TUser user, string normalizedEmail, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SetNormalizedUserNameAsync(TUser user, string normalizedName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SetPasswordHashAsync(TUser user, string passwordHash, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SetPhoneNumberAsync(TUser user, string phoneNumber, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SetPhoneNumberConfirmedAsync(TUser user, bool confirmed, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SetSecurityStampAsync(TUser user, string stamp, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.Diagnostics.DebuggerStepThroughAttribute] + public virtual System.Threading.Tasks.Task SetTokenAsync(TUser user, string loginProvider, string name, string value, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task SetTwoFactorEnabledAsync(TUser user, bool enabled, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SetUserNameAsync(TUser user, string userName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected void ThrowIfDisposed() { } + public abstract System.Threading.Tasks.Task UpdateAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + public abstract partial class UserStoreBase : Microsoft.AspNetCore.Identity.UserStoreBase, Microsoft.AspNetCore.Identity.IUserRoleStore, Microsoft.AspNetCore.Identity.IUserStore, System.IDisposable where TUser : Microsoft.AspNetCore.Identity.IdentityUser where TRole : Microsoft.AspNetCore.Identity.IdentityRole where TKey : System.IEquatable where TUserClaim : Microsoft.AspNetCore.Identity.IdentityUserClaim, new() where TUserRole : Microsoft.AspNetCore.Identity.IdentityUserRole, new() where TUserLogin : Microsoft.AspNetCore.Identity.IdentityUserLogin, new() where TUserToken : Microsoft.AspNetCore.Identity.IdentityUserToken, new() where TRoleClaim : Microsoft.AspNetCore.Identity.IdentityRoleClaim, new() + { + public UserStoreBase(Microsoft.AspNetCore.Identity.IdentityErrorDescriber describer) : base (default(Microsoft.AspNetCore.Identity.IdentityErrorDescriber)) { } + public abstract System.Threading.Tasks.Task AddToRoleAsync(TUser user, string normalizedRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected virtual TUserRole CreateUserRole(TUser user, TRole role) { throw null; } + protected abstract System.Threading.Tasks.Task FindRoleAsync(string normalizedRoleName, System.Threading.CancellationToken cancellationToken); + protected abstract System.Threading.Tasks.Task FindUserRoleAsync(TKey userId, TKey roleId, System.Threading.CancellationToken cancellationToken); + public abstract System.Threading.Tasks.Task> GetRolesAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task> GetUsersInRoleAsync(string normalizedRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task IsInRoleAsync(TUser user, string normalizedRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task RemoveFromRoleAsync(TUser user, string normalizedRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } +} diff --git a/src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj b/src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj index a3fd7e5c65..49955dc48b 100644 --- a/src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj +++ b/src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj @@ -2,7 +2,8 @@ ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. ASP.NET Core Identity allows you to add login features to your application and makes it easy to customize data about the logged in user. - netstandard2.0 + netstandard2.0;netcoreapp3.0 + netcoreapp3.0 true true true diff --git a/src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.csproj b/src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.csproj index e965b33d18..64c2d6f679 100644 --- a/src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.csproj +++ b/src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.0;netcoreapp3.0 @@ -9,4 +9,10 @@ + + + + + + diff --git a/src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.netcoreapp3.0.cs b/src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.netcoreapp3.0.cs new file mode 100644 index 0000000000..ab30a7c6d5 --- /dev/null +++ b/src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.netcoreapp3.0.cs @@ -0,0 +1,224 @@ +// 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. + +namespace Microsoft.AspNetCore.Authorization +{ + [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)] + public partial class AllowAnonymousAttribute : System.Attribute, Microsoft.AspNetCore.Authorization.IAllowAnonymous + { + public AllowAnonymousAttribute() { } + } + public partial class AuthorizationFailure + { + internal AuthorizationFailure() { } + public bool FailCalled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.IEnumerable FailedRequirements { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public static Microsoft.AspNetCore.Authorization.AuthorizationFailure ExplicitFail() { throw null; } + public static Microsoft.AspNetCore.Authorization.AuthorizationFailure Failed(System.Collections.Generic.IEnumerable failed) { throw null; } + } + public partial class AuthorizationHandlerContext + { + public AuthorizationHandlerContext(System.Collections.Generic.IEnumerable requirements, System.Security.Claims.ClaimsPrincipal user, object resource) { } + public virtual bool HasFailed { get { throw null; } } + public virtual bool HasSucceeded { get { throw null; } } + public virtual System.Collections.Generic.IEnumerable PendingRequirements { get { throw null; } } + public virtual System.Collections.Generic.IEnumerable Requirements { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public virtual object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public virtual System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public virtual void Fail() { } + public virtual void Succeed(Microsoft.AspNetCore.Authorization.IAuthorizationRequirement requirement) { } + } + public abstract partial class AuthorizationHandler : Microsoft.AspNetCore.Authorization.IAuthorizationHandler where TRequirement : Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + protected AuthorizationHandler() { } + [System.Diagnostics.DebuggerStepThroughAttribute] + public virtual System.Threading.Tasks.Task HandleAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context) { throw null; } + protected abstract System.Threading.Tasks.Task HandleRequirementAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context, TRequirement requirement); + } + public abstract partial class AuthorizationHandler : Microsoft.AspNetCore.Authorization.IAuthorizationHandler where TRequirement : Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + protected AuthorizationHandler() { } + [System.Diagnostics.DebuggerStepThroughAttribute] + public virtual System.Threading.Tasks.Task HandleAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context) { throw null; } + protected abstract System.Threading.Tasks.Task HandleRequirementAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context, TRequirement requirement, TResource resource); + } + public partial class AuthorizationOptions + { + public AuthorizationOptions() { } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicy DefaultPolicy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicy FallbackPolicy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool InvokeHandlersAfterFailure { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public void AddPolicy(string name, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy) { } + public void AddPolicy(string name, System.Action configurePolicy) { } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicy GetPolicy(string name) { throw null; } + } + public partial class AuthorizationPolicy + { + public AuthorizationPolicy(System.Collections.Generic.IEnumerable requirements, System.Collections.Generic.IEnumerable authenticationSchemes) { } + public System.Collections.Generic.IReadOnlyList AuthenticationSchemes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public System.Collections.Generic.IReadOnlyList Requirements { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public static Microsoft.AspNetCore.Authorization.AuthorizationPolicy Combine(params Microsoft.AspNetCore.Authorization.AuthorizationPolicy[] policies) { throw null; } + public static Microsoft.AspNetCore.Authorization.AuthorizationPolicy Combine(System.Collections.Generic.IEnumerable policies) { throw null; } + [System.Diagnostics.DebuggerStepThroughAttribute] + public static System.Threading.Tasks.Task CombineAsync(Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider policyProvider, System.Collections.Generic.IEnumerable authorizeData) { throw null; } + } + public partial class AuthorizationPolicyBuilder + { + public AuthorizationPolicyBuilder(Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy) { } + public AuthorizationPolicyBuilder(params string[] authenticationSchemes) { } + public System.Collections.Generic.IList AuthenticationSchemes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public System.Collections.Generic.IList Requirements { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder AddAuthenticationSchemes(params string[] schemes) { throw null; } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder AddRequirements(params Microsoft.AspNetCore.Authorization.IAuthorizationRequirement[] requirements) { throw null; } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicy Build() { throw null; } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder Combine(Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy) { throw null; } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireAssertion(System.Func handler) { throw null; } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireAssertion(System.Func> handler) { throw null; } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireAuthenticatedUser() { throw null; } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireClaim(string claimType) { throw null; } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireClaim(string claimType, System.Collections.Generic.IEnumerable allowedValues) { throw null; } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireClaim(string claimType, params string[] allowedValues) { throw null; } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireRole(System.Collections.Generic.IEnumerable roles) { throw null; } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireRole(params string[] roles) { throw null; } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireUserName(string userName) { throw null; } + } + public partial class AuthorizationResult + { + internal AuthorizationResult() { } + public Microsoft.AspNetCore.Authorization.AuthorizationFailure Failure { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public bool Succeeded { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public static Microsoft.AspNetCore.Authorization.AuthorizationResult Failed() { throw null; } + public static Microsoft.AspNetCore.Authorization.AuthorizationResult Failed(Microsoft.AspNetCore.Authorization.AuthorizationFailure failure) { throw null; } + public static Microsoft.AspNetCore.Authorization.AuthorizationResult Success() { throw null; } + } + public static partial class AuthorizationServiceExtensions + { + public static System.Threading.Tasks.Task AuthorizeAsync(this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy) { throw null; } + public static System.Threading.Tasks.Task AuthorizeAsync(this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, object resource, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy) { throw null; } + public static System.Threading.Tasks.Task AuthorizeAsync(this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, object resource, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement requirement) { throw null; } + public static System.Threading.Tasks.Task AuthorizeAsync(this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, string policyName) { throw null; } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)] + public partial class AuthorizeAttribute : System.Attribute, Microsoft.AspNetCore.Authorization.IAuthorizeData + { + public AuthorizeAttribute() { } + public AuthorizeAttribute(string policy) { } + public string AuthenticationSchemes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class DefaultAuthorizationEvaluator : Microsoft.AspNetCore.Authorization.IAuthorizationEvaluator + { + public DefaultAuthorizationEvaluator() { } + public Microsoft.AspNetCore.Authorization.AuthorizationResult Evaluate(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context) { throw null; } + } + public partial class DefaultAuthorizationHandlerContextFactory : Microsoft.AspNetCore.Authorization.IAuthorizationHandlerContextFactory + { + public DefaultAuthorizationHandlerContextFactory() { } + public virtual Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext CreateContext(System.Collections.Generic.IEnumerable requirements, System.Security.Claims.ClaimsPrincipal user, object resource) { throw null; } + } + public partial class DefaultAuthorizationHandlerProvider : Microsoft.AspNetCore.Authorization.IAuthorizationHandlerProvider + { + public DefaultAuthorizationHandlerProvider(System.Collections.Generic.IEnumerable handlers) { } + public System.Threading.Tasks.Task> GetHandlersAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context) { throw null; } + } + public partial class DefaultAuthorizationPolicyProvider : Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider + { + public DefaultAuthorizationPolicyProvider(Microsoft.Extensions.Options.IOptions options) { } + public System.Threading.Tasks.Task GetDefaultPolicyAsync() { throw null; } + public System.Threading.Tasks.Task GetFallbackPolicyAsync() { throw null; } + public virtual System.Threading.Tasks.Task GetPolicyAsync(string policyName) { throw null; } + } + public partial class DefaultAuthorizationService : Microsoft.AspNetCore.Authorization.IAuthorizationService + { + public DefaultAuthorizationService(Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider policyProvider, Microsoft.AspNetCore.Authorization.IAuthorizationHandlerProvider handlers, Microsoft.Extensions.Logging.ILogger logger, Microsoft.AspNetCore.Authorization.IAuthorizationHandlerContextFactory contextFactory, Microsoft.AspNetCore.Authorization.IAuthorizationEvaluator evaluator, Microsoft.Extensions.Options.IOptions options) { } + [System.Diagnostics.DebuggerStepThroughAttribute] + public System.Threading.Tasks.Task AuthorizeAsync(System.Security.Claims.ClaimsPrincipal user, object resource, System.Collections.Generic.IEnumerable requirements) { throw null; } + [System.Diagnostics.DebuggerStepThroughAttribute] + public System.Threading.Tasks.Task AuthorizeAsync(System.Security.Claims.ClaimsPrincipal user, object resource, string policyName) { throw null; } + } + public partial interface IAuthorizationEvaluator + { + Microsoft.AspNetCore.Authorization.AuthorizationResult Evaluate(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context); + } + public partial interface IAuthorizationHandler + { + System.Threading.Tasks.Task HandleAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context); + } + public partial interface IAuthorizationHandlerContextFactory + { + Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext CreateContext(System.Collections.Generic.IEnumerable requirements, System.Security.Claims.ClaimsPrincipal user, object resource); + } + public partial interface IAuthorizationHandlerProvider + { + System.Threading.Tasks.Task> GetHandlersAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context); + } + public partial interface IAuthorizationPolicyProvider + { + System.Threading.Tasks.Task GetDefaultPolicyAsync(); + System.Threading.Tasks.Task GetFallbackPolicyAsync(); + System.Threading.Tasks.Task GetPolicyAsync(string policyName); + } + public partial interface IAuthorizationRequirement + { + } + public partial interface IAuthorizationService + { + System.Threading.Tasks.Task AuthorizeAsync(System.Security.Claims.ClaimsPrincipal user, object resource, System.Collections.Generic.IEnumerable requirements); + System.Threading.Tasks.Task AuthorizeAsync(System.Security.Claims.ClaimsPrincipal user, object resource, string policyName); + } +} +namespace Microsoft.AspNetCore.Authorization.Infrastructure +{ + public partial class AssertionRequirement : Microsoft.AspNetCore.Authorization.IAuthorizationHandler, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + public AssertionRequirement(System.Func handler) { } + public AssertionRequirement(System.Func> handler) { } + public System.Func> Handler { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + [System.Diagnostics.DebuggerStepThroughAttribute] + public System.Threading.Tasks.Task HandleAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context) { throw null; } + } + public partial class ClaimsAuthorizationRequirement : Microsoft.AspNetCore.Authorization.AuthorizationHandler, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + public ClaimsAuthorizationRequirement(string claimType, System.Collections.Generic.IEnumerable allowedValues) { } + public System.Collections.Generic.IEnumerable AllowedValues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string ClaimType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected override System.Threading.Tasks.Task HandleRequirementAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context, Microsoft.AspNetCore.Authorization.Infrastructure.ClaimsAuthorizationRequirement requirement) { throw null; } + } + public partial class DenyAnonymousAuthorizationRequirement : Microsoft.AspNetCore.Authorization.AuthorizationHandler, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + public DenyAnonymousAuthorizationRequirement() { } + protected override System.Threading.Tasks.Task HandleRequirementAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context, Microsoft.AspNetCore.Authorization.Infrastructure.DenyAnonymousAuthorizationRequirement requirement) { throw null; } + } + public partial class NameAuthorizationRequirement : Microsoft.AspNetCore.Authorization.AuthorizationHandler, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + public NameAuthorizationRequirement(string requiredName) { } + public string RequiredName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected override System.Threading.Tasks.Task HandleRequirementAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context, Microsoft.AspNetCore.Authorization.Infrastructure.NameAuthorizationRequirement requirement) { throw null; } + } + public partial class OperationAuthorizationRequirement : Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + public OperationAuthorizationRequirement() { } + public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + } + public partial class PassThroughAuthorizationHandler : Microsoft.AspNetCore.Authorization.IAuthorizationHandler + { + public PassThroughAuthorizationHandler() { } + [System.Diagnostics.DebuggerStepThroughAttribute] + public System.Threading.Tasks.Task HandleAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context) { throw null; } + } + public partial class RolesAuthorizationRequirement : Microsoft.AspNetCore.Authorization.AuthorizationHandler, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + public RolesAuthorizationRequirement(System.Collections.Generic.IEnumerable allowedRoles) { } + public System.Collections.Generic.IEnumerable AllowedRoles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + protected override System.Threading.Tasks.Task HandleRequirementAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context, Microsoft.AspNetCore.Authorization.Infrastructure.RolesAuthorizationRequirement requirement) { throw null; } + } +} +namespace Microsoft.Extensions.DependencyInjection +{ + public static partial class AuthorizationServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthorizationCore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) { throw null; } + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthorizationCore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configure) { throw null; } + } +} diff --git a/src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj b/src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj index 6e17562a94..4f3a07755f 100644 --- a/src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj +++ b/src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj @@ -5,7 +5,8 @@ Commonly used types: Microsoft.AspNetCore.Authorization.AllowAnonymousAttribute Microsoft.AspNetCore.Authorization.AuthorizeAttribute - netstandard2.0 + netstandard2.0;netcoreapp3.0 + netcoreapp3.0 true true $(NoWarn);CS1591 diff --git a/src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.csproj b/src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.csproj index 755346f72f..a3f3f48546 100644 --- a/src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.csproj +++ b/src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1 + netstandard2.0;netstandard2.1;netcoreapp3.0 @@ -16,4 +16,10 @@ + + + + + + diff --git a/src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.netcoreapp3.0.cs b/src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.netcoreapp3.0.cs new file mode 100644 index 0000000000..dbd0a70349 --- /dev/null +++ b/src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.netcoreapp3.0.cs @@ -0,0 +1,202 @@ +// 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. + +namespace Microsoft.AspNetCore.Connections +{ + public partial class AddressInUseException : System.InvalidOperationException + { + public AddressInUseException(string message) { } + public AddressInUseException(string message, System.Exception inner) { } + } + public partial class ConnectionAbortedException : System.OperationCanceledException + { + public ConnectionAbortedException() { } + public ConnectionAbortedException(string message) { } + public ConnectionAbortedException(string message, System.Exception inner) { } + } + public partial class ConnectionBuilder : Microsoft.AspNetCore.Connections.IConnectionBuilder + { + public ConnectionBuilder(System.IServiceProvider applicationServices) { } + public System.IServiceProvider ApplicationServices { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.AspNetCore.Connections.ConnectionDelegate Build() { throw null; } + public Microsoft.AspNetCore.Connections.IConnectionBuilder Use(System.Func middleware) { throw null; } + } + public static partial class ConnectionBuilderExtensions + { + public static Microsoft.AspNetCore.Connections.IConnectionBuilder Run(this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder, System.Func middleware) { throw null; } + public static Microsoft.AspNetCore.Connections.IConnectionBuilder Use(this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder, System.Func, System.Threading.Tasks.Task> middleware) { throw null; } + public static Microsoft.AspNetCore.Connections.IConnectionBuilder UseConnectionHandler(this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder) where TConnectionHandler : Microsoft.AspNetCore.Connections.ConnectionHandler { throw null; } + } + public abstract partial class ConnectionContext : System.IAsyncDisposable + { + protected ConnectionContext() { } + public virtual System.Threading.CancellationToken ConnectionClosed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public abstract string ConnectionId { get; set; } + public abstract Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { get; } + public abstract System.Collections.Generic.IDictionary Items { get; set; } + public virtual System.Net.EndPoint LocalEndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public virtual System.Net.EndPoint RemoteEndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public abstract System.IO.Pipelines.IDuplexPipe Transport { get; set; } + public virtual void Abort() { } + public virtual void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason) { } + public virtual System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } + } + public delegate System.Threading.Tasks.Task ConnectionDelegate(Microsoft.AspNetCore.Connections.ConnectionContext connection); + public abstract partial class ConnectionHandler + { + protected ConnectionHandler() { } + public abstract System.Threading.Tasks.Task OnConnectedAsync(Microsoft.AspNetCore.Connections.ConnectionContext connection); + } + public partial class ConnectionItems : System.Collections.Generic.ICollection>, System.Collections.Generic.IDictionary, System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable + { + public ConnectionItems() { } + public ConnectionItems(System.Collections.Generic.IDictionary items) { } + public System.Collections.Generic.IDictionary Items { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + int System.Collections.Generic.ICollection>.Count { get { throw null; } } + bool System.Collections.Generic.ICollection>.IsReadOnly { get { throw null; } } + object System.Collections.Generic.IDictionary.this[object key] { get { throw null; } set { } } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get { throw null; } } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get { throw null; } } + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair item) { } + void System.Collections.Generic.ICollection>.Clear() { } + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair item) { throw null; } + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { } + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) { throw null; } + void System.Collections.Generic.IDictionary.Add(object key, object value) { } + bool System.Collections.Generic.IDictionary.ContainsKey(object key) { throw null; } + bool System.Collections.Generic.IDictionary.Remove(object key) { throw null; } + bool System.Collections.Generic.IDictionary.TryGetValue(object key, out object value) { throw null; } + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ConnectionResetException : System.IO.IOException + { + public ConnectionResetException(string message) { } + public ConnectionResetException(string message, System.Exception inner) { } + } + public partial class DefaultConnectionContext : Microsoft.AspNetCore.Connections.ConnectionContext, Microsoft.AspNetCore.Connections.Features.IConnectionEndPointFeature, Microsoft.AspNetCore.Connections.Features.IConnectionIdFeature, Microsoft.AspNetCore.Connections.Features.IConnectionItemsFeature, Microsoft.AspNetCore.Connections.Features.IConnectionLifetimeFeature, Microsoft.AspNetCore.Connections.Features.IConnectionTransportFeature, Microsoft.AspNetCore.Connections.Features.IConnectionUserFeature + { + public DefaultConnectionContext() { } + public DefaultConnectionContext(string id) { } + public DefaultConnectionContext(string id, System.IO.Pipelines.IDuplexPipe transport, System.IO.Pipelines.IDuplexPipe application) { } + public System.IO.Pipelines.IDuplexPipe Application { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public override System.Threading.CancellationToken ConnectionClosed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public override string ConnectionId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public override Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public override System.Collections.Generic.IDictionary Items { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public override System.Net.EndPoint LocalEndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public override System.Net.EndPoint RemoteEndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public override System.IO.Pipelines.IDuplexPipe Transport { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public override void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason) { } + public override System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } + } + public partial class FileHandleEndPoint : System.Net.EndPoint + { + public FileHandleEndPoint(ulong fileHandle, Microsoft.AspNetCore.Connections.FileHandleType fileHandleType) { } + public ulong FileHandle { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.AspNetCore.Connections.FileHandleType FileHandleType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public enum FileHandleType + { + Auto = 0, + Tcp = 1, + Pipe = 2, + } + public partial interface IConnectionBuilder + { + System.IServiceProvider ApplicationServices { get; } + Microsoft.AspNetCore.Connections.ConnectionDelegate Build(); + Microsoft.AspNetCore.Connections.IConnectionBuilder Use(System.Func middleware); + } + public partial interface IConnectionFactory + { + System.Threading.Tasks.ValueTask ConnectAsync(System.Net.EndPoint endpoint, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + public partial interface IConnectionListener : System.IAsyncDisposable + { + System.Net.EndPoint EndPoint { get; } + System.Threading.Tasks.ValueTask AcceptAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.ValueTask UnbindAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + public partial interface IConnectionListenerFactory + { + System.Threading.Tasks.ValueTask BindAsync(System.Net.EndPoint endpoint, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + [System.FlagsAttribute] + public enum TransferFormat + { + Binary = 1, + Text = 2, + } + public partial class UriEndPoint : System.Net.EndPoint + { + public UriEndPoint(System.Uri uri) { } + public System.Uri Uri { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } +} +namespace Microsoft.AspNetCore.Connections.Features +{ + public partial interface IConnectionCompleteFeature + { + void OnCompleted(System.Func callback, object state); + } + public partial interface IConnectionEndPointFeature + { + System.Net.EndPoint LocalEndPoint { get; set; } + System.Net.EndPoint RemoteEndPoint { get; set; } + } + public partial interface IConnectionHeartbeatFeature + { + void OnHeartbeat(System.Action action, object state); + } + public partial interface IConnectionIdFeature + { + string ConnectionId { get; set; } + } + public partial interface IConnectionInherentKeepAliveFeature + { + bool HasInherentKeepAlive { get; } + } + public partial interface IConnectionItemsFeature + { + System.Collections.Generic.IDictionary Items { get; set; } + } + public partial interface IConnectionLifetimeFeature + { + System.Threading.CancellationToken ConnectionClosed { get; set; } + void Abort(); + } + public partial interface IConnectionLifetimeNotificationFeature + { + System.Threading.CancellationToken ConnectionClosedRequested { get; set; } + void RequestClose(); + } + public partial interface IConnectionTransportFeature + { + System.IO.Pipelines.IDuplexPipe Transport { get; set; } + } + public partial interface IConnectionUserFeature + { + System.Security.Claims.ClaimsPrincipal User { get; set; } + } + public partial interface IMemoryPoolFeature + { + System.Buffers.MemoryPool MemoryPool { get; } + } + public partial interface ITlsHandshakeFeature + { + System.Security.Authentication.CipherAlgorithmType CipherAlgorithm { get; } + int CipherStrength { get; } + System.Security.Authentication.HashAlgorithmType HashAlgorithm { get; } + int HashStrength { get; } + System.Security.Authentication.ExchangeAlgorithmType KeyExchangeAlgorithm { get; } + int KeyExchangeStrength { get; } + System.Security.Authentication.SslProtocols Protocol { get; } + } + public partial interface ITransferFormatFeature + { + Microsoft.AspNetCore.Connections.TransferFormat ActiveFormat { get; set; } + Microsoft.AspNetCore.Connections.TransferFormat SupportedFormats { get; } + } +} diff --git a/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj b/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj index 52711dccf0..71c228d23f 100644 --- a/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj +++ b/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj @@ -2,7 +2,8 @@ Core components of ASP.NET Core networking protocol stack. - netstandard2.0;netstandard2.1 + netstandard2.0;netstandard2.1;netcoreapp3.0 + netcoreapp3.0 true true aspnetcore diff --git a/src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj b/src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj index 3b037ab722..2f2b3f3256 100644 --- a/src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj +++ b/src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj @@ -3,6 +3,7 @@ Common primitives for ASP.NET Connection Handlers and clients netstandard2.0;netcoreapp3.0 + netcoreapp3.0 true Microsoft.AspNetCore.Http.Connections true diff --git a/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj b/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj index 5904b5dc87..4c10f93b02 100644 --- a/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj +++ b/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj @@ -3,6 +3,7 @@ Implements the SignalR Hub Protocol using System.Text.Json. netstandard2.0;netcoreapp3.0 + netcoreapp3.0 true Microsoft.AspNetCore.SignalR true diff --git a/src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj b/src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj index 118f42dc23..7a50628e44 100644 --- a/src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj +++ b/src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj @@ -3,6 +3,7 @@ Common serialiation primitives for SignalR Clients Servers netstandard2.0;netcoreapp3.0 + netcoreapp3.0 true Microsoft.AspNetCore.SignalR true From 18f5ec71edb385636ef25ff6269bca03ed40f0f6 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Sun, 4 Aug 2019 13:06:16 -0700 Subject: [PATCH 05/24] Terminate circuit on error Fixes: #11845 See: https://github.com/aspnet/AspNetCore/pull/12857 for detailed notes. --- .../src/Rendering/ComponentState.cs | 32 +- .../Components/src/Rendering/Renderer.cs | 34 +- .../Components/test/RendererTest.cs | 302 ++++++- .../Server/src/CircuitDisconnectMiddleware.cs | 2 +- .../Server/src/Circuits/CircuitHandle.cs | 14 + .../Server/src/Circuits/CircuitHost.cs | 739 ++++++++++++------ .../Server/src/Circuits/CircuitRegistry.cs | 81 +- .../src/Circuits/DefaultCircuitFactory.cs | 42 +- src/Components/Server/src/ComponentHub.cs | 239 +++--- .../Server/test/Circuits/CircuitHostTest.cs | 11 +- .../test/Circuits/CircuitRegistryTest.cs | 26 +- .../Server/test/Circuits/TestCircuitHost.cs | 12 +- ...soft.AspNetCore.Components.E2ETests.csproj | 4 +- .../ComponentHubReliabilityTest.cs | 193 ++++- .../InteropReliabilityTests.cs | 388 ++++++--- .../test/testassets/BasicTestApp/Index.razor | 1 + .../NavigationFailureComponent.razor | 28 + .../ReliabilityComponent.razor | 58 ++ .../ThrowingAttachComponent.cs | 19 + .../ThrowingConstructorComponent.cs | 24 + .../ThrowingDisposeComponent.cs | 27 + .../ThrowingOnAfterRenderAsyncComponent.cs | 28 + .../ThrowingOnAfterRenderSyncComponent.cs | 27 + .../ThrowingRenderComponent.cs | 22 + .../ThrowingSetParametersAsyncComponent.cs | 19 + .../ThrowingSetParametersSyncComponent.cs | 18 + .../test/testassets/Ignitor/BlazorClient.cs | 130 +-- 27 files changed, 1887 insertions(+), 633 deletions(-) create mode 100644 src/Components/Server/src/Circuits/CircuitHandle.cs create mode 100644 src/Components/test/testassets/BasicTestApp/NavigationFailureComponent.razor create mode 100644 src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingAttachComponent.cs create mode 100644 src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingConstructorComponent.cs create mode 100644 src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingDisposeComponent.cs create mode 100644 src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingOnAfterRenderAsyncComponent.cs create mode 100644 src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingOnAfterRenderSyncComponent.cs create mode 100644 src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingRenderComponent.cs create mode 100644 src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingSetParametersAsyncComponent.cs create mode 100644 src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingSetParametersSyncComponent.cs diff --git a/src/Components/Components/src/Rendering/ComponentState.cs b/src/Components/Components/src/Rendering/ComponentState.cs index a0609b9331..1b999f30fa 100644 --- a/src/Components/Components/src/Rendering/ComponentState.cs +++ b/src/Components/Components/src/Rendering/ComponentState.cs @@ -75,16 +75,24 @@ namespace Microsoft.AspNetCore.Components.Rendering batchBuilder.UpdatedComponentDiffs.Append(diff); } - public void DisposeInBatch(RenderBatchBuilder batchBuilder) + public bool TryDisposeInBatch(RenderBatchBuilder batchBuilder, out Exception exception) { _componentWasDisposed = true; + exception = null; - // TODO: Handle components throwing during dispose. Shouldn't break the whole render batch. - if (Component is IDisposable disposable) + try { - disposable.Dispose(); + if (Component is IDisposable disposable) + { + disposable.Dispose(); + } + } + catch (Exception ex) + { + exception = ex; } + // We don't expect these things to throw. RenderTreeDiffBuilder.DisposeFrames(batchBuilder, CurrentRenderTree.GetFrames()); if (_hasAnyCascadingParameterSubscriptions) @@ -93,13 +101,27 @@ namespace Microsoft.AspNetCore.Components.Rendering } DisposeBuffers(); + + return exception == null; } + // Callers expect this method to always return a faulted task. public Task NotifyRenderCompletedAsync() { if (Component is IHandleAfterRender handlerAfterRender) { - return handlerAfterRender.OnAfterRenderAsync(); + try + { + return handlerAfterRender.OnAfterRenderAsync(); + } + catch (OperationCanceledException cex) + { + return Task.FromCanceled(cex.CancellationToken); + } + catch (Exception ex) + { + return Task.FromException(ex); + } } return Task.CompletedTask; diff --git a/src/Components/Components/src/Rendering/Renderer.cs b/src/Components/Components/src/Rendering/Renderer.cs index ed3d075f0a..1ca8636192 100644 --- a/src/Components/Components/src/Rendering/Renderer.cs +++ b/src/Components/Components/src/Rendering/Renderer.cs @@ -587,16 +587,31 @@ namespace Microsoft.AspNetCore.Components.Rendering Log.RenderingComponent(_logger, componentState); componentState.RenderIntoBatch(_batchBuilder, renderQueueEntry.RenderFragment); + List exceptions = null; + // Process disposal queue now in case it causes further component renders to be enqueued while (_batchBuilder.ComponentDisposalQueue.Count > 0) { var disposeComponentId = _batchBuilder.ComponentDisposalQueue.Dequeue(); var disposeComponentState = GetRequiredComponentState(disposeComponentId); Log.DisposingComponent(_logger, disposeComponentState); - disposeComponentState.DisposeInBatch(_batchBuilder); + if (!disposeComponentState.TryDisposeInBatch(_batchBuilder, out var exception)) + { + exceptions ??= new List(); + exceptions.Add(exception); + } _componentStateById.Remove(disposeComponentId); _batchBuilder.DisposedComponentIds.Append(disposeComponentId); } + + if (exceptions?.Count > 1) + { + HandleException(new AggregateException("Exceptions were encountered while disposing components.", exceptions)); + } + else if (exceptions?.Count == 1) + { + HandleException(exceptions[0]); + } } private void RemoveEventHandlerIds(ArrayRange eventHandlerIds, Task afterTaskIgnoreErrors) @@ -681,6 +696,9 @@ namespace Microsoft.AspNetCore.Components.Rendering /// if this method is being invoked by , otherwise . protected virtual void Dispose(bool disposing) { + // It's important that we handle all exceptions here before reporting any of them. + // This way we can dispose all components before an error handler kicks in. + List exceptions = null; foreach (var componentState in _componentStateById.Values) { Log.DisposingComponent(_logger, componentState); @@ -693,11 +711,21 @@ namespace Microsoft.AspNetCore.Components.Rendering } catch (Exception exception) { - HandleException(exception); + exceptions ??= new List(); + exceptions.Add(exception); } } + } - _batchBuilder.Dispose(); + _batchBuilder.Dispose(); + + if (exceptions?.Count > 1) + { + HandleException(new AggregateException("Exceptions were encountered while disposing components.", exceptions)); + } + else if (exceptions?.Count == 1) + { + HandleException(exceptions[0]); } } diff --git a/src/Components/Components/test/RendererTest.cs b/src/Components/Components/test/RendererTest.cs index 8d3ce23570..677b9fb952 100644 --- a/src/Components/Components/test/RendererTest.cs +++ b/src/Components/Components/test/RendererTest.cs @@ -2046,6 +2046,127 @@ namespace Microsoft.AspNetCore.Components.Test Assert.Equal(2, renderer.Batches.Count); } + [Fact] + public void RenderBatch_HandlesExceptionsFromAllDisposedComponents() + { + // Arrange + var renderer = new TestRenderer { ShouldHandleExceptions = true }; + var exception1 = new Exception(); + var exception2 = new Exception(); + + var firstRender = true; + var component = new TestComponent(builder => + { + if (firstRender) + { + builder.AddContent(0, "Hello"); + builder.OpenComponent(1); + builder.AddAttribute(1, nameof(DisposableComponent.DisposeAction), (Action)(() => throw exception1)); + builder.CloseComponent(); + + builder.OpenComponent(2); + builder.AddAttribute(1, nameof(DisposableComponent.DisposeAction), (Action)(() => throw exception2)); + builder.CloseComponent(); + } + }); + var componentId = renderer.AssignRootComponentId(component); + component.TriggerRender(); + + // Act: Second render + firstRender = false; + component.TriggerRender(); + + // Assert: Applicable children are included in disposal list + Assert.Equal(2, renderer.Batches.Count); + Assert.Equal(new[] { 1, 2 }, renderer.Batches[1].DisposedComponentIDs); + + // Outer component is still alive and not disposed. + Assert.False(component.Disposed); + var aex = Assert.IsType(Assert.Single(renderer.HandledExceptions)); + Assert.Contains(exception1, aex.InnerExceptions); + Assert.Contains(exception2, aex.InnerExceptions); + } + + [Fact] + public void RenderBatch_DoesNotDisposeComponentMultipleTimes() + { + // Arrange + var renderer = new TestRenderer { ShouldHandleExceptions = true }; + var exception1 = new Exception(); + var exception2 = new Exception(); + + var count1 = 0; + var count2 = 0; + var count3 = 0; + var count4 = 0; + var count5 = 0; + + var firstRender = true; + var component = new TestComponent(builder => + { + if (firstRender) + { + builder.AddContent(0, "Hello"); + builder.OpenComponent(1); + builder.AddAttribute(1, nameof(DisposableComponent.DisposeAction), (Action)(() => { count1++; })); + builder.CloseComponent(); + + builder.OpenComponent(2); + builder.AddAttribute(1, nameof(DisposableComponent.DisposeAction), (Action)(() => { count2++; throw exception1; })); + builder.CloseComponent(); + + builder.OpenComponent(3); + builder.AddAttribute(1, nameof(DisposableComponent.DisposeAction), (Action)(() => { count3++; })); + builder.CloseComponent(); + } + + builder.OpenComponent(4); + builder.AddAttribute(1, nameof(DisposableComponent.DisposeAction), (Action)(() => { count4++; throw exception2; })); + builder.CloseComponent(); + + builder.OpenComponent(5); + builder.AddAttribute(1, nameof(DisposableComponent.DisposeAction), (Action)(() => { count5++; })); + builder.CloseComponent(); + }); + var componentId = renderer.AssignRootComponentId(component); + component.TriggerRender(); + + // Act: Second render + firstRender = false; + component.TriggerRender(); + + // Assert: Applicable children are included in disposal list + Assert.Equal(2, renderer.Batches.Count); + Assert.Equal(new[] { 1, 2, 3 }, renderer.Batches[1].DisposedComponentIDs); + + // Components "disposed" in the batch were all disposed, components that are still live were not disposed + Assert.Equal(1, count1); + Assert.Equal(1, count2); + Assert.Equal(1, count3); + Assert.Equal(0, count4); + Assert.Equal(0, count5); + + // Outer component is still alive and not disposed. + Assert.False(component.Disposed); + var ex = Assert.IsType(Assert.Single(renderer.HandledExceptions)); + Assert.Same(exception1, ex); + + // Act: Dispose renderer + renderer.Dispose(); + + Assert.Equal(2, renderer.HandledExceptions.Count); + ex = renderer.HandledExceptions[1]; + Assert.Same(exception2, ex); + + // Assert: Everything was disposed once. + Assert.Equal(1, count1); + Assert.Equal(1, count2); + Assert.Equal(1, count3); + Assert.Equal(1, count4); + Assert.Equal(1, count5); + Assert.True(component.Disposed); + } + [Fact] public async Task DisposesEventHandlersWhenAttributeValueChanged() { @@ -3059,7 +3180,7 @@ namespace Microsoft.AspNetCore.Components.Test } [Fact] - public async Task ExceptionsThrownFromHandleAfterRender_AreHandled() + public async Task ExceptionsThrownFromHandleAfterRender_Sync_AreHandled() { // Arrange var renderer = new TestRenderer { ShouldHandleExceptions = true }; @@ -3078,7 +3199,7 @@ namespace Microsoft.AspNetCore.Components.Test { new NestedAsyncComponent.ExecutionAction { - Event = NestedAsyncComponent.EventType.OnAfterRenderAsync, + Event = NestedAsyncComponent.EventType.OnAfterRenderAsyncSync, EventAction = () => { throw exception; @@ -3089,12 +3210,11 @@ namespace Microsoft.AspNetCore.Components.Test { new NestedAsyncComponent.ExecutionAction { - Event = NestedAsyncComponent.EventType.OnAfterRenderAsync, - EventAction = async () => + Event = NestedAsyncComponent.EventType.OnAfterRenderAsyncSync, + EventAction = () => { - await Task.Yield(); taskCompletionSource.TrySetResult(0); - return (1, NestedAsyncComponent.EventType.OnAfterRenderAsync); + return Task.FromResult((1, NestedAsyncComponent.EventType.OnAfterRenderAsyncSync)); }, } } @@ -3113,6 +3233,137 @@ namespace Microsoft.AspNetCore.Components.Test Assert.Same(exception, Assert.Single(renderer.HandledExceptions).GetBaseException()); } + [Fact] + public async Task ExceptionsThrownFromHandleAfterRender_Async_AreHandled() + { + // Arrange + var renderer = new TestRenderer { ShouldHandleExceptions = true }; + var component = new NestedAsyncComponent(); + var exception = new InvalidTimeZoneException(); + + var taskCompletionSource = new TaskCompletionSource(); + + // Act/Assert + var componentId = renderer.AssignRootComponentId(component); + var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary + { + [nameof(NestedAsyncComponent.EventActions)] = new Dictionary> + { + [0] = new[] + { + new NestedAsyncComponent.ExecutionAction + { + Event = NestedAsyncComponent.EventType.OnAfterRenderAsyncAsync, + EventAction = async () => + { + await Task.Yield(); + throw exception; + }, + } + }, + [1] = new[] + { + new NestedAsyncComponent.ExecutionAction + { + Event = NestedAsyncComponent.EventType.OnAfterRenderAsyncAsync, + EventAction = async () => + { + await Task.Yield(); + taskCompletionSource.TrySetResult(0); + return (1, NestedAsyncComponent.EventType.OnAfterRenderAsyncAsync); + }, + } + } + }, + [nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary> + { + [0] = CreateRenderFactory(new[] { 1 }), + [1] = CreateRenderFactory(Array.Empty()), + }, + })); + + Assert.True(renderTask.IsCompletedSuccessfully); + + // OnAfterRenderAsync happens in the background. Make it more predictable, by gating it until we're ready to capture exceptions. + await taskCompletionSource.Task.TimeoutAfter(TimeSpan.FromSeconds(10)); + Assert.Same(exception, Assert.Single(renderer.HandledExceptions).GetBaseException()); + } + + [Fact] + public async Task ExceptionThrownFromConstructor() + { + // Arrange + var renderer = new TestRenderer { ShouldHandleExceptions = true }; + var component = new TestComponent(builder => + { + builder.OpenComponent(0); + builder.CloseComponent(); + }); + + // Act/Assert + var componentId = renderer.AssignRootComponentId(component); + var renderTask = renderer.RenderRootComponentAsync(componentId); + + await renderTask; + Assert.True(renderTask.IsCompletedSuccessfully); + Assert.Same(ConstructorThrowingComponent.Exception, Assert.Single(renderer.HandledExceptions).GetBaseException()); + } + + private class ConstructorThrowingComponent : IComponent + { + public static readonly Exception Exception = new InvalidTimeZoneException(); + + public ConstructorThrowingComponent() + { + throw Exception; + } + + public void Attach(RenderHandle renderHandle) + { + throw new NotImplementedException(); + } + + public Task SetParametersAsync(ParameterView parameters) + { + throw new NotImplementedException(); + } + } + + [Fact] + public async Task ExceptionThrownFromAttach() + { + // Arrange + var renderer = new TestRenderer { ShouldHandleExceptions = true }; + var component = new TestComponent(builder => + { + builder.OpenComponent(0); + builder.CloseComponent(); + }); + + // Act/Assert + var componentId = renderer.AssignRootComponentId(component); + var renderTask = renderer.RenderRootComponentAsync(componentId); + + await renderTask; + Assert.True(renderTask.IsCompletedSuccessfully); + Assert.Same(AttachThrowingComponent.Exception, Assert.Single(renderer.HandledExceptions).GetBaseException()); + } + + private class AttachThrowingComponent : IComponent + { + public static readonly Exception Exception = new InvalidTimeZoneException(); + + public void Attach(RenderHandle renderHandle) + { + throw Exception; + } + + public Task SetParametersAsync(ParameterView parameters) + { + throw new NotImplementedException(); + } + } + [Fact] public void SynchronousCancelledTasks_HandleAfterRender_Works() { @@ -3132,7 +3383,7 @@ namespace Microsoft.AspNetCore.Components.Test { new NestedAsyncComponent.ExecutionAction { - Event = NestedAsyncComponent.EventType.OnAfterRenderAsync, + Event = NestedAsyncComponent.EventType.OnAfterRenderAsyncAsync, EventAction = () => tcs.Task, } }, @@ -3166,7 +3417,7 @@ namespace Microsoft.AspNetCore.Components.Test { new NestedAsyncComponent.ExecutionAction { - Event = NestedAsyncComponent.EventType.OnAfterRenderAsync, + Event = NestedAsyncComponent.EventType.OnAfterRenderAsyncAsync, EventAction = () => tcs.Task, } }, @@ -3203,7 +3454,7 @@ namespace Microsoft.AspNetCore.Components.Test { new NestedAsyncComponent.ExecutionAction { - Event = NestedAsyncComponent.EventType.OnAfterRenderAsync, + Event = NestedAsyncComponent.EventType.OnAfterRenderAsyncSync, EventAction = () => { taskCompletionSource.TrySetResult(0); @@ -3291,9 +3542,9 @@ namespace Microsoft.AspNetCore.Components.Test // All components must be disposed even if some throw as part of being diposed. Assert.True(component.Disposed); - Assert.Equal(2, renderer.HandledExceptions.Count); - Assert.Contains(exception1, renderer.HandledExceptions); - Assert.Contains(exception2, renderer.HandledExceptions); + var aex = Assert.IsType(Assert.Single(renderer.HandledExceptions)); + Assert.Contains(exception1, aex.InnerExceptions); + Assert.Contains(exception2, aex.InnerExceptions); } [Theory] @@ -3941,6 +4192,7 @@ namespace Microsoft.AspNetCore.Components.Test if (TryGetEntry(EventType.OnInit, out var entry)) { var result = entry.EventAction(); + Assert.True(result.IsCompleted, "Task must complete synchronously."); LogResult(result.Result); } } @@ -3949,8 +4201,9 @@ namespace Microsoft.AspNetCore.Components.Test { if (TryGetEntry(EventType.OnInitAsyncSync, out var entrySync)) { - var result = await entrySync.EventAction(); - LogResult(result); + var result = entrySync.EventAction(); + Assert.True(result.IsCompleted, "Task must complete synchronously."); + LogResult(result.Result); } else if (TryGetEntry(EventType.OnInitAsyncAsync, out var entryAsync)) { @@ -3964,6 +4217,7 @@ namespace Microsoft.AspNetCore.Components.Test if (TryGetEntry(EventType.OnParametersSet, out var entry)) { var result = entry.EventAction(); + Assert.True(result.IsCompleted, "Task must complete synchronously."); LogResult(result.Result); } base.OnParametersSet(); @@ -3973,10 +4227,9 @@ namespace Microsoft.AspNetCore.Components.Test { if (TryGetEntry(EventType.OnParametersSetAsyncSync, out var entrySync)) { - var result = await entrySync.EventAction(); - LogResult(result); - - await entrySync.EventAction(); + var result = entrySync.EventAction(); + Assert.True(result.IsCompleted, "Task must complete synchronously."); + LogResult(result.Result); } else if (TryGetEntry(EventType.OnParametersSetAsyncAsync, out var entryAsync)) { @@ -3993,9 +4246,15 @@ namespace Microsoft.AspNetCore.Components.Test protected override async Task OnAfterRenderAsync() { - if (TryGetEntry(EventType.OnAfterRenderAsync, out var entry)) + if (TryGetEntry(EventType.OnAfterRenderAsyncSync, out var entrySync)) { - var result = await entry.EventAction(); + var result = entrySync.EventAction(); + Assert.True(result.IsCompleted, "Task must complete synchronously."); + LogResult(result.Result); + } + if (TryGetEntry(EventType.OnAfterRenderAsyncAsync, out var entryAsync)) + { + var result = await entryAsync.EventAction(); LogResult(result); } } @@ -4054,7 +4313,8 @@ namespace Microsoft.AspNetCore.Components.Test OnParametersSet, OnParametersSetAsyncSync, OnParametersSetAsyncAsync, - OnAfterRenderAsync, + OnAfterRenderAsyncSync, + OnAfterRenderAsyncAsync, } } diff --git a/src/Components/Server/src/CircuitDisconnectMiddleware.cs b/src/Components/Server/src/CircuitDisconnectMiddleware.cs index ecacf511d7..0792e009d3 100644 --- a/src/Components/Server/src/CircuitDisconnectMiddleware.cs +++ b/src/Components/Server/src/CircuitDisconnectMiddleware.cs @@ -78,7 +78,7 @@ namespace Microsoft.AspNetCore.Components.Server { try { - await Registry.Terminate(circuitId); + await Registry.TerminateAsync(circuitId); Log.CircuitTerminatedGracefully(Logger, circuitId); } catch (Exception e) diff --git a/src/Components/Server/src/Circuits/CircuitHandle.cs b/src/Components/Server/src/Circuits/CircuitHandle.cs new file mode 100644 index 0000000000..88493453d0 --- /dev/null +++ b/src/Components/Server/src/Circuits/CircuitHandle.cs @@ -0,0 +1,14 @@ +// 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. + +namespace Microsoft.AspNetCore.Components.Server.Circuits +{ + // Used to isolate a circuit from a CircuitHost. + // + // We can't refer to Hub.Items from a CircuitHost - but we want need to be + // able to break the link between Hub.Items and a CircuitHost. + internal class CircuitHandle + { + public CircuitHost CircuitHost { get; set; } + } +} diff --git a/src/Components/Server/src/Circuits/CircuitHost.cs b/src/Components/Server/src/Circuits/CircuitHost.cs index 92a2365971..8a5fd717af 100644 --- a/src/Components/Server/src/Circuits/CircuitHost.cs +++ b/src/Components/Server/src/Circuits/CircuitHost.cs @@ -8,6 +8,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.Web.Rendering; +using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.JSInterop; @@ -18,9 +19,11 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits { private readonly SemaphoreSlim HandlerLock = new SemaphoreSlim(1); private readonly IServiceScope _scope; + private readonly CircuitOptions _options; private readonly CircuitHandler[] _circuitHandlers; private readonly ILogger _logger; private bool _initialized; + private bool _disposed; /// /// Sets the current . @@ -42,11 +45,18 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits JSInterop.JSRuntime.SetCurrentJSRuntime(circuitHost.JSRuntime); } + // This event is fired when there's an unrecoverable exception coming from the circuit, and + // it need so be torn down. The registry listens to this even so that the circuit can + // be torn down even when a client is not connected. + // + // We don't expect the registry to do anything with the exception. We only provide it here + // for testability. public event UnhandledExceptionEventHandler UnhandledException; public CircuitHost( string circuitId, IServiceScope scope, + CircuitOptions options, CircuitClientProxy client, RemoteRenderer renderer, IReadOnlyList descriptors, @@ -54,23 +64,28 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits CircuitHandler[] circuitHandlers, ILogger logger) { - CircuitId = circuitId; + CircuitId = circuitId ?? throw new ArgumentNullException(nameof(circuitId)); + _scope = scope ?? throw new ArgumentNullException(nameof(scope)); - Client = client; - Descriptors = descriptors ?? throw new ArgumentNullException(nameof(descriptors)); + _options = options ?? throw new ArgumentNullException(nameof(options)); + Client = client ?? throw new ArgumentNullException(nameof(client)); Renderer = renderer ?? throw new ArgumentNullException(nameof(renderer)); + Descriptors = descriptors ?? throw new ArgumentNullException(nameof(descriptors)); JSRuntime = jsRuntime ?? throw new ArgumentNullException(nameof(jsRuntime)); - _logger = logger; + _circuitHandlers = circuitHandlers ?? throw new ArgumentNullException(nameof(circuitHandlers)); + _logger = logger ?? throw new ArgumentNullException(nameof(logger)); Services = scope.ServiceProvider; Circuit = new Circuit(this); - _circuitHandlers = circuitHandlers; + Handle = new CircuitHandle() { CircuitHost = this, }; Renderer.UnhandledException += Renderer_UnhandledException; Renderer.UnhandledSynchronizationException += SynchronizationContext_UnhandledException; } + public CircuitHandle Handle { get; } + public string CircuitId { get; } public Circuit Circuit { get; } @@ -85,88 +100,19 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits public IServiceProvider Services { get; } - public void SetCircuitUser(ClaimsPrincipal user) + // InitializeAsync is used in a fire-and-forget context, so it's responsible for its own + // error handling. + public Task InitializeAsync(CancellationToken cancellationToken) { - var authenticationStateProvider = Services.GetService() as IHostEnvironmentAuthenticationStateProvider; - if (authenticationStateProvider != null) + Log.InitializationStarted(_logger); + + return Renderer.Dispatcher.InvokeAsync(async () => { - var authenticationState = new AuthenticationState(user); - authenticationStateProvider.SetAuthenticationState(Task.FromResult(authenticationState)); - } - } - - internal void SendPendingBatches() - { - // Dispatch any buffered renders we accumulated during a disconnect. - // Note that while the rendering is async, we cannot await it here. The Task returned by ProcessBufferedRenderBatches relies on - // OnRenderCompleted to be invoked to complete, and SignalR does not allow concurrent hub method invocations. - _ = Renderer.Dispatcher.InvokeAsync(() => Renderer.ProcessBufferedRenderBatches()); - } - - public async Task EndInvokeJSFromDotNet(long asyncCall, bool succeded, string arguments) - { - try - { - AssertInitialized(); - - await Renderer.Dispatcher.InvokeAsync(() => + if (_initialized) { - SetCurrentCircuitHost(this); - if (!succeded) - { - // We can log the arguments here because it is simply the JS error with the call stack. - Log.EndInvokeJSFailed(_logger, asyncCall, arguments); - } - else - { - Log.EndInvokeJSSucceeded(_logger, asyncCall); - } + throw new InvalidOperationException("The circuit host is already initialized."); + } - DotNetDispatcher.EndInvoke(arguments); - }); - } - catch (Exception ex) - { - Log.EndInvokeDispatchException(_logger, ex); - } - } - - public async Task DispatchEvent(string eventDescriptorJson, string eventArgsJson) - { - WebEventData webEventData; - try - { - AssertInitialized(); - webEventData = WebEventData.Parse(eventDescriptorJson, eventArgsJson); - } - catch (Exception ex) - { - Log.DispatchEventFailedToParseEventData(_logger, ex); - return; - } - - try - { - await Renderer.Dispatcher.InvokeAsync(() => - { - SetCurrentCircuitHost(this); - return Renderer.DispatchEventAsync( - webEventData.EventHandlerId, - webEventData.EventFieldInfo, - webEventData.EventArgs); - }); - } - catch (Exception ex) - { - Log.DispatchEventFailedToDispatchEvent(_logger, webEventData.EventHandlerId.ToString(), ex); - UnhandledException?.Invoke(this, new UnhandledExceptionEventArgs(ex, isTerminating: false)); - } - } - - public async Task InitializeAsync(CancellationToken cancellationToken) - { - await Renderer.Dispatcher.InvokeAsync(async () => - { try { SetCurrentCircuitHost(this); @@ -185,92 +131,117 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits var (componentType, domElementSelector) = Descriptors[i]; await Renderer.AddComponentAsync(componentType, domElementSelector); } + + Log.InitializationSucceeded(_logger); } catch (Exception ex) { - // We have to handle all our own errors here, because the upstream caller - // has to fire-and-forget this - Renderer_UnhandledException(this, ex); + // Report errors asynchronously. InitializeAsync is designed not to throw. + Log.InitializationFailed(_logger, ex); + UnhandledException?.Invoke(this, new UnhandledExceptionEventArgs(ex, isTerminating: false)); } }); } - public async Task BeginInvokeDotNetFromJS(string callId, string assemblyName, string methodIdentifier, long dotNetObjectId, string argsJson) + // We handle errors in DisposeAsync because there's no real value in letting it propagate. + // We run user code here (CircuitHandlers) and it's reasonable to expect some might throw, however, + // there isn't anything better to do than log when one of these exceptions happens - because the + // client is already gone. + public async ValueTask DisposeAsync() { - try - { - AssertInitialized(); + Log.DisposeStarted(_logger, CircuitId); - await Renderer.Dispatcher.InvokeAsync(() => - { - SetCurrentCircuitHost(this); - Log.BeginInvokeDotNet(_logger, callId, assemblyName, methodIdentifier, dotNetObjectId); - DotNetDispatcher.BeginInvoke(callId, assemblyName, methodIdentifier, dotNetObjectId, argsJson); - }); - } - catch (Exception ex) + await Renderer.Dispatcher.InvokeAsync(async () => { - // We don't expect any of this code to actually throw, because DotNetDispatcher.BeginInvoke doesn't throw - // however, we still want this to get logged if we do. - UnhandledException?.Invoke(this, new UnhandledExceptionEventArgs(ex, isTerminating: false)); - } - } - - public async Task OnLocationChangedAsync(string uri, bool intercepted) - { - try - { - AssertInitialized(); - await Renderer.Dispatcher.InvokeAsync(() => - { - SetCurrentCircuitHost(this); - Log.LocationChange(_logger, CircuitId, uri); - var navigationManager = (RemoteNavigationManager)Services.GetRequiredService(); - navigationManager.NotifyLocationChanged(uri, intercepted); - Log.LocationChangeSucceeded(_logger, CircuitId, uri); - }); - } - catch (Exception ex) - { - // It's up to the NavigationManager implementation to validate the URI. - // - // Note that it's also possible that setting the URI could cause a failure in code that listens - // to NavigationManager.LocationChanged. - // - // In either case, a well-behaved client will not send invalid URIs, and we don't really - // want to continue processing with the circuit if setting the URI failed inside application - // code. The safest thing to do is consider it a critical failure since URI is global state, - // and a failure means that an update to global state was partially applied. - Log.LocationChangeFailed(_logger, CircuitId, uri, ex); - UnhandledException?.Invoke(this, new UnhandledExceptionEventArgs(ex, isTerminating: false)); - } + if (_disposed) + { + return; + } + + // Make sure that no hub or connection can refer to this circuit anymore now that it's shutting down. + Handle.CircuitHost = null; + _disposed = true; + + try + { + await OnConnectionDownAsync(CancellationToken.None); + } + catch + { + // Individual exceptions logged as part of OnConnectionDownAsync - nothing to do here + // since we're already shutting down. + } + + try + { + await OnCircuitDownAsync(CancellationToken.None); + } + catch + { + // Individual exceptions logged as part of OnCircuitDownAsync - nothing to do here + // since we're already shutting down. + } + + try + { + Renderer.Dispose(); + _scope.Dispose(); + Log.DisposeSucceeded(_logger, CircuitId); + } + catch (Exception ex) + { + Log.DisposeFailed(_logger, CircuitId, ex); + } + }); } + // Note: we log exceptions and re-throw while running handlers, because there may be multiple + // exceptions. private async Task OnCircuitOpenedAsync(CancellationToken cancellationToken) { Log.CircuitOpened(_logger, Circuit.Id); - for (var i = 0; i < _circuitHandlers.Length; i++) + await HandlerLock.WaitAsync(cancellationToken); + + try { - var circuitHandler = _circuitHandlers[i]; - try + List exceptions = null; + + for (var i = 0; i < _circuitHandlers.Length; i++) { - await circuitHandler.OnCircuitOpenedAsync(Circuit, cancellationToken); + var circuitHandler = _circuitHandlers[i]; + try + { + await circuitHandler.OnCircuitOpenedAsync(Circuit, cancellationToken); + } + catch (Exception ex) + { + Log.CircuitHandlerFailed(_logger, circuitHandler, nameof(CircuitHandler.OnCircuitOpenedAsync), ex); + exceptions ??= new List(); + exceptions.Add(ex); + } } - catch (Exception ex) + + if (exceptions != null) { - OnHandlerError(circuitHandler, nameof(CircuitHandler.OnCircuitOpenedAsync), ex); + throw new AggregateException("Encountered exceptions while executing circuit handlers.", exceptions); } } + finally + { + HandlerLock.Release(); + } } public async Task OnConnectionUpAsync(CancellationToken cancellationToken) { Log.ConnectionUp(_logger, Circuit.Id, Client.ConnectionId); + await HandlerLock.WaitAsync(cancellationToken); + try { - await HandlerLock.WaitAsync(cancellationToken); + List exceptions = null; for (var i = 0; i < _circuitHandlers.Length; i++) { @@ -281,9 +252,16 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits } catch (Exception ex) { - OnHandlerError(circuitHandler, nameof(CircuitHandler.OnConnectionUpAsync), ex); + Log.CircuitHandlerFailed(_logger, circuitHandler, nameof(CircuitHandler.OnConnectionUpAsync), ex); + exceptions ??= new List(); + exceptions.Add(ex); } } + + if (exceptions != null) + { + throw new AggregateException("Encountered exceptions while executing circuit handlers.", exceptions); + } } finally { @@ -295,9 +273,11 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits { Log.ConnectionDown(_logger, Circuit.Id, Client.ConnectionId); + await HandlerLock.WaitAsync(cancellationToken); + try { - await HandlerLock.WaitAsync(cancellationToken); + List exceptions = null; for (var i = 0; i < _circuitHandlers.Length; i++) { @@ -308,9 +288,16 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits } catch (Exception ex) { - OnHandlerError(circuitHandler, nameof(CircuitHandler.OnConnectionDownAsync), ex); + Log.CircuitHandlerFailed(_logger, circuitHandler, nameof(CircuitHandler.OnConnectionDownAsync), ex); + exceptions ??= new List(); + exceptions.Add(ex); } } + + if (exceptions != null) + { + throw new AggregateException("Encountered exceptions while executing circuit handlers.", exceptions); + } } finally { @@ -318,46 +305,229 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits } } - protected virtual void OnHandlerError(CircuitHandler circuitHandler, string handlerMethod, Exception ex) - { - Log.UnhandledExceptionInvokingCircuitHandler(_logger, circuitHandler, handlerMethod, ex); - } - - private async Task OnCircuitDownAsync() + private async Task OnCircuitDownAsync(CancellationToken cancellationToken) { Log.CircuitClosed(_logger, Circuit.Id); - for (var i = 0; i < _circuitHandlers.Length; i++) + await HandlerLock.WaitAsync(cancellationToken); + + try { - var circuitHandler = _circuitHandlers[i]; - try + List exceptions = null; + + for (var i = 0; i < _circuitHandlers.Length; i++) { - await circuitHandler.OnCircuitClosedAsync(Circuit, default); + var circuitHandler = _circuitHandlers[i]; + try + { + await circuitHandler.OnCircuitClosedAsync(Circuit, cancellationToken); + } + catch (Exception ex) + { + Log.CircuitHandlerFailed(_logger, circuitHandler, nameof(CircuitHandler.OnCircuitClosedAsync), ex); + exceptions ??= new List(); + exceptions.Add(ex); + } } - catch (Exception ex) + + if (exceptions != null) { - OnHandlerError(circuitHandler, nameof(CircuitHandler.OnCircuitClosedAsync), ex); + throw new AggregateException("Encountered exceptions while executing circuit handlers.", exceptions); } } + finally + { + HandlerLock.Release(); + } } - public async ValueTask DisposeAsync() + // BeginInvokeDotNetFromJS is used in a fire-and-forget context, so it's responsible for its own + // error handling. + public async Task BeginInvokeDotNetFromJS(string callId, string assemblyName, string methodIdentifier, long dotNetObjectId, string argsJson) { - Log.DisposingCircuit(_logger, CircuitId); + AssertInitialized(); + AssertNotDisposed(); - await Renderer.Dispatcher.InvokeAsync(async () => + try { - try + await Renderer.Dispatcher.InvokeAsync(() => { - await OnConnectionDownAsync(CancellationToken.None); - await OnCircuitDownAsync(); - } - finally + SetCurrentCircuitHost(this); + Log.BeginInvokeDotNet(_logger, callId, assemblyName, methodIdentifier, dotNetObjectId); + DotNetDispatcher.BeginInvoke(callId, assemblyName, methodIdentifier, dotNetObjectId, argsJson); + }); + } + catch (Exception ex) + { + // We don't expect any of this code to actually throw, because DotNetDispatcher.BeginInvoke doesn't throw + // however, we still want this to get logged if we do. + Log.BeginInvokeDotNetFailed(_logger, callId, assemblyName, methodIdentifier, dotNetObjectId, ex); + if (Client.Connected) { - Renderer.Dispose(); - _scope.Dispose(); + await NotifyClientError(Client, "Interop call failed."); } - }); + UnhandledException?.Invoke(this, new UnhandledExceptionEventArgs(ex, isTerminating: false)); + } + } + + // EndInvokeJSFromDotNet is used in a fire-and-forget context, so it's responsible for its own + // error handling. + public async Task EndInvokeJSFromDotNet(long asyncCall, bool succeded, string arguments) + { + AssertInitialized(); + AssertNotDisposed(); + + try + { + await Renderer.Dispatcher.InvokeAsync(() => + { + SetCurrentCircuitHost(this); + if (!succeded) + { + // We can log the arguments here because it is simply the JS error with the call stack. + Log.EndInvokeJSFailed(_logger, asyncCall, arguments); + } + else + { + Log.EndInvokeJSSucceeded(_logger, asyncCall); + } + + DotNetDispatcher.EndInvoke(arguments); + }); + } + catch (Exception ex) + { + // An error completing JS interop means that the user sent invalid data, a well-behaved + // client won't do this. + Log.EndInvokeDispatchException(_logger, ex); + if (Client.Connected) + { + await NotifyClientError(Client, "Invalid interop arguments."); + } + UnhandledException?.Invoke(this, new UnhandledExceptionEventArgs(ex, isTerminating: false)); + } + } + + // DispatchEvent is used in a fire-and-forget context, so it's responsible for its own + // error handling. + public async Task DispatchEvent(string eventDescriptorJson, string eventArgsJson) + { + AssertInitialized(); + AssertNotDisposed(); + + WebEventData webEventData; + try + { + AssertInitialized(); + webEventData = WebEventData.Parse(eventDescriptorJson, eventArgsJson); + } + catch (Exception ex) + { + // Invalid event data is fatal. We expect a well-behaved client to send valid JSON. + Log.DispatchEventFailedToParseEventData(_logger, ex); + if (Client.Connected) + { + await NotifyClientError(Client, "Invalid event data."); + } + UnhandledException?.Invoke(this, new UnhandledExceptionEventArgs(ex, isTerminating: false)); + return; + } + + try + { + await Renderer.Dispatcher.InvokeAsync(() => + { + SetCurrentCircuitHost(this); + return Renderer.DispatchEventAsync( + webEventData.EventHandlerId, + webEventData.EventFieldInfo, + webEventData.EventArgs); + }); + } + catch (Exception ex) + { + // A failure in dispatching an event means that it was an attempt to use an invalid event id. + // A well-behaved client won't do this. + Log.DispatchEventFailedToDispatchEvent(_logger, webEventData.EventHandlerId.ToString(), ex); + if (Client.Connected) + { + await NotifyClientError(Client, "Failed to dispatch event."); + } + UnhandledException?.Invoke(this, new UnhandledExceptionEventArgs(ex, isTerminating: false)); + } + } + + // OnLocationChangedAsync is used in a fire-and-forget context, so it's responsible for its own + // error handling. + public async Task OnLocationChangedAsync(string uri, bool intercepted) + { + AssertInitialized(); + AssertNotDisposed(); + + try + { + await Renderer.Dispatcher.InvokeAsync(() => + { + SetCurrentCircuitHost(this); + Log.LocationChange(_logger, uri, CircuitId); + var navigationManager = (RemoteNavigationManager)Services.GetRequiredService(); + navigationManager.NotifyLocationChanged(uri, intercepted); + Log.LocationChangeSucceeded(_logger, uri, CircuitId); + }); + } + + // It's up to the NavigationManager implementation to validate the URI. + // + // Note that it's also possible that setting the URI could cause a failure in code that listens + // to NavigationManager.LocationChanged. + // + // In either case, a well-behaved client will not send invalid URIs, and we don't really + // want to continue processing with the circuit if setting the URI failed inside application + // code. The safest thing to do is consider it a critical failure since URI is global state, + // and a failure means that an update to global state was partially applied. + catch (LocationChangeException nex) + { + // LocationChangeException means that it failed in user-code. Treat this like an unhandled + // exception in user-code. + Log.LocationChangeFailedInCircuit(_logger, uri, CircuitId, nex); + await ReportUnhandledException(nex); + UnhandledException?.Invoke(this, new UnhandledExceptionEventArgs(nex, isTerminating: false)); + } + catch (Exception ex) + { + // Any other exception means that it failed validation, or inside the NavigationManager. Treat + // this like bad data. + Log.LocationChangeFailed(_logger, uri, CircuitId, ex); + if (Client.Connected) + { + await NotifyClientError(Client, $"Location change to {uri} failed."); + } + UnhandledException?.Invoke(this, new UnhandledExceptionEventArgs(ex, isTerminating: false)); + } + } + + public void SetCircuitUser(ClaimsPrincipal user) + { + // This can be called before the circuit is initialized. + AssertNotDisposed(); + + var authenticationStateProvider = Services.GetService() as IHostEnvironmentAuthenticationStateProvider; + if (authenticationStateProvider != null) + { + var authenticationState = new AuthenticationState(user); + authenticationStateProvider.SetAuthenticationState(Task.FromResult(authenticationState)); + } + } + + public void SendPendingBatches() + { + AssertInitialized(); + AssertNotDisposed(); + + // Dispatch any buffered renders we accumulated during a disconnect. + // Note that while the rendering is async, we cannot await it here. The Task returned by ProcessBufferedRenderBatches relies on + // OnRenderCompleted to be invoked to complete, and SignalR does not allow concurrent hub method invocations. + _ = Renderer.Dispatcher.InvokeAsync(() => Renderer.ProcessBufferedRenderBatches()); } private void AssertInitialized() @@ -368,26 +538,86 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits } } - private void Renderer_UnhandledException(object sender, Exception e) + private void AssertNotDisposed() { + if (_disposed) + { + throw new ObjectDisposedException(objectName: null); + } + } + + // An unhandled exception from the renderer is always fatal because it came from user code. + // We want to notify the client if it's still connected, and then tear-down the circuit. + private async void Renderer_UnhandledException(object sender, Exception e) + { + await ReportUnhandledException(e); UnhandledException?.Invoke(this, new UnhandledExceptionEventArgs(e, isTerminating: false)); } - private void SynchronizationContext_UnhandledException(object sender, UnhandledExceptionEventArgs e) + // An unhandled exception from the renderer is always fatal because it came from user code. + // We want to notify the client if it's still connected, and then tear-down the circuit. + private async void SynchronizationContext_UnhandledException(object sender, UnhandledExceptionEventArgs e) { + await ReportUnhandledException((Exception)e.ExceptionObject); UnhandledException?.Invoke(this, e); } + private async Task ReportUnhandledException(Exception exception) + { + Log.CircuitUnhandledException(_logger, CircuitId, exception); + if (!Client.Connected) + { + _logger.LogDebug("Client is disconnected YO."); + return; + } + + try + { + if (_options.DetailedErrors) + { + await NotifyClientError(Client, exception.ToString()); + } + else + { + var message = + $"There was an unhandled exception on the current circuit, so this circuit will be terminated. For more details turn on " + + $"detailed exceptions in '{typeof(CircuitOptions).Name}.{nameof(CircuitOptions.DetailedErrors)}'"; + await NotifyClientError(Client, message); + } + } + catch (Exception ex) + { + Log.CircuitUnhandledExceptionFailed(_logger, CircuitId, ex); + } + } + + private async Task NotifyClientError(IClientProxy client, string error) + { + _logger.LogDebug("About to notify of an error"); + await client.SendAsync("JS.Error", error); + _logger.LogDebug("Completed notify of an error"); + } + private static class Log { - private static readonly Action _unhandledExceptionInvokingCircuitHandler; - private static readonly Action _disposingCircuit; + private static readonly Action _intializationStarted; + private static readonly Action _intializationSucceded; + private static readonly Action _intializationFailed; + private static readonly Action _disposeStarted; + private static readonly Action _disposeSucceded; + private static readonly Action _disposeFailed; private static readonly Action _onCircuitOpened; private static readonly Action _onConnectionUp; private static readonly Action _onConnectionDown; private static readonly Action _onCircuitClosed; + private static readonly Action _circuitHandlerFailed; + private static readonly Action _circuitUnhandledException; + private static readonly Action _circuitUnhandledExceptionFailed; + private static readonly Action _beginInvokeDotNetStatic; private static readonly Action _beginInvokeDotNetInstance; + private static readonly Action _beginInvokeDotNetStaticFailed; + private static readonly Action _beginInvokeDotNetInstanceFailed; private static readonly Action _endInvokeDispatchException; private static readonly Action _endInvokeJSFailed; private static readonly Action _endInvokeJSSucceeded; @@ -396,39 +626,71 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits private static readonly Action _locationChange; private static readonly Action _locationChangeSucceeded; private static readonly Action _locationChangeFailed; + private static readonly Action _locationChangeFailedInCircuit; private static class EventIds { - public static readonly EventId ExceptionInvokingCircuitHandlerMethod = new EventId(100, "ExceptionInvokingCircuitHandlerMethod"); - public static readonly EventId DisposingCircuit = new EventId(101, "DisposingCircuitHost"); - public static readonly EventId OnCircuitOpened = new EventId(102, "OnCircuitOpened"); - public static readonly EventId OnConnectionUp = new EventId(103, "OnConnectionUp"); - public static readonly EventId OnConnectionDown = new EventId(104, "OnConnectionDown"); - public static readonly EventId OnCircuitClosed = new EventId(105, "OnCircuitClosed"); - public static readonly EventId InvalidBrowserEventFormat = new EventId(106, "InvalidBrowserEventFormat"); - public static readonly EventId DispatchEventFailedToParseEventData = new EventId(107, "DispatchEventFailedToParseEventData"); - public static readonly EventId DispatchEventFailedToDispatchEvent = new EventId(108, "DispatchEventFailedToDispatchEvent"); - public static readonly EventId BeginInvokeDotNet = new EventId(109, "BeginInvokeDotNet"); - public static readonly EventId EndInvokeDispatchException = new EventId(110, "EndInvokeDispatchException"); - public static readonly EventId EndInvokeJSFailed = new EventId(111, "EndInvokeJSFailed"); - public static readonly EventId EndInvokeJSSucceeded = new EventId(112, "EndInvokeJSSucceeded"); - public static readonly EventId DispatchEventThroughJSInterop = new EventId(113, "DispatchEventThroughJSInterop"); - public static readonly EventId LocationChange = new EventId(114, "LocationChange"); - public static readonly EventId LocationChangeSucceded = new EventId(115, "LocationChangeSucceeded"); - public static readonly EventId LocationChangeFailed = new EventId(116, "LocationChangeFailed"); + // 100s used for lifecycle stuff + public static readonly EventId InitializationStarted = new EventId(100, "InitializationStarted"); + public static readonly EventId InitializationSucceeded = new EventId(101, "InitializationSucceeded"); + public static readonly EventId InitializationFailed = new EventId(102, "InitializationFailed"); + public static readonly EventId DisposeStarted = new EventId(103, "DisposeStarted"); + public static readonly EventId DisposeSucceeded = new EventId(104, "DisposeSucceeded"); + public static readonly EventId DisposeFailed = new EventId(105, "DisposeFailed"); + public static readonly EventId OnCircuitOpened = new EventId(106, "OnCircuitOpened"); + public static readonly EventId OnConnectionUp = new EventId(107, "OnConnectionUp"); + public static readonly EventId OnConnectionDown = new EventId(108, "OnConnectionDown"); + public static readonly EventId OnCircuitClosed = new EventId(109, "OnCircuitClosed"); + public static readonly EventId CircuitHandlerFailed = new EventId(110, "CircuitHandlerFailed"); + public static readonly EventId CircuitUnhandledException = new EventId(111, "CircuitUnhandledException"); + public static readonly EventId CircuitUnhandledExceptionFailed = new EventId(112, "CircuitUnhandledExceptionFailed"); + + // 200s used for interactive stuff + public static readonly EventId DispatchEventFailedToParseEventData = new EventId(200, "DispatchEventFailedToParseEventData"); + public static readonly EventId DispatchEventFailedToDispatchEvent = new EventId(201, "DispatchEventFailedToDispatchEvent"); + public static readonly EventId BeginInvokeDotNet = new EventId(202, "BeginInvokeDotNet"); + public static readonly EventId BeginInvokeDotNetFailed = new EventId(203, "BeginInvokeDotNetFailed"); + public static readonly EventId EndInvokeDispatchException = new EventId(204, "EndInvokeDispatchException"); + public static readonly EventId EndInvokeJSFailed = new EventId(205, "EndInvokeJSFailed"); + public static readonly EventId EndInvokeJSSucceeded = new EventId(206, "EndInvokeJSSucceeded"); + public static readonly EventId DispatchEventThroughJSInterop = new EventId(207, "DispatchEventThroughJSInterop"); + public static readonly EventId LocationChange = new EventId(208, "LocationChange"); + public static readonly EventId LocationChangeSucceded = new EventId(209, "LocationChangeSucceeded"); + public static readonly EventId LocationChangeFailed = new EventId(210, "LocationChangeFailed"); + public static readonly EventId LocationChangeFailedInCircuit = new EventId(211, "LocationChangeFailedInCircuit"); } static Log() { - _unhandledExceptionInvokingCircuitHandler = LoggerMessage.Define( - LogLevel.Error, - EventIds.ExceptionInvokingCircuitHandlerMethod, - "Unhandled error invoking circuit handler type {handlerType}.{handlerMethod}: {Message}"); - - _disposingCircuit = LoggerMessage.Define( + _intializationStarted = LoggerMessage.Define( LogLevel.Debug, - EventIds.DisposingCircuit, - "Disposing circuit with identifier {CircuitId}"); + EventIds.InitializationFailed, + "Circuit initialization started"); + + _intializationSucceded = LoggerMessage.Define( + LogLevel.Debug, + EventIds.InitializationFailed, + "Circuit initialization succeeded"); + + _intializationFailed = LoggerMessage.Define( + LogLevel.Debug, + EventIds.InitializationFailed, + "Circuit initialization failed"); + + _disposeStarted = LoggerMessage.Define( + LogLevel.Debug, + EventIds.DisposeStarted, + "Disposing circuit {CircuitId} started"); + + _disposeSucceded = LoggerMessage.Define( + LogLevel.Debug, + EventIds.DisposeSucceeded, + "Disposing circuit {CircuitId} succeded"); + + _disposeFailed = LoggerMessage.Define( + LogLevel.Debug, + EventIds.DisposeFailed, + "Disposing circuit {CircuitId} failed"); _onCircuitOpened = LoggerMessage.Define( LogLevel.Debug, @@ -450,6 +712,21 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits EventIds.OnCircuitClosed, "Closing circuit with id {CircuitId}."); + _circuitHandlerFailed = LoggerMessage.Define( + LogLevel.Error, + EventIds.CircuitHandlerFailed, + "Unhandled error invoking circuit handler type {handlerType}.{handlerMethod}: {Message}"); + + _circuitUnhandledException = LoggerMessage.Define( + LogLevel.Error, + EventIds.CircuitUnhandledException, + "Unhandled exception in circuit {CircuitId}"); + + _circuitUnhandledExceptionFailed = LoggerMessage.Define( + LogLevel.Debug, + EventIds.CircuitUnhandledExceptionFailed, + "Failed to transmit exception to client in circuit {CircuitId}"); + _beginInvokeDotNetStatic = LoggerMessage.Define( LogLevel.Debug, EventIds.BeginInvokeDotNet, @@ -460,6 +737,16 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits EventIds.BeginInvokeDotNet, "Invoking instance method '{MethodIdentifier}' on instance '{DotNetObjectId}' with callback id '{CallId}'"); + _beginInvokeDotNetStaticFailed = LoggerMessage.Define( + LogLevel.Debug, + EventIds.BeginInvokeDotNetFailed, + "Failed to invoke static method with identifier '{MethodIdentifier}' on assembly '{Assembly}' with callback id '{CallId}'"); + + _beginInvokeDotNetInstanceFailed = LoggerMessage.Define( + LogLevel.Debug, + EventIds.BeginInvokeDotNetFailed, + "Failed to invoke instance method '{MethodIdentifier}' on instance '{DotNetObjectId}' with callback id '{CallId}'"); + _endInvokeDispatchException = LoggerMessage.Define( LogLevel.Debug, EventIds.EndInvokeDispatchException, @@ -488,22 +775,38 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits _locationChange = LoggerMessage.Define( LogLevel.Debug, EventIds.LocationChange, - "Location changing to {URI} in {CircuitId}."); + "Location changing to {URI} in circuit {CircuitId}."); _locationChangeSucceeded = LoggerMessage.Define( LogLevel.Debug, EventIds.LocationChangeSucceded, - "Location change to {URI} in {CircuitId} succeded."); + "Location change to {URI} in circuit {CircuitId} succeded."); _locationChangeFailed = LoggerMessage.Define( LogLevel.Debug, EventIds.LocationChangeFailed, - "Location change to {URI} in {CircuitId} failed."); + "Location change to {URI} in circuit {CircuitId} failed."); + + _locationChangeFailedInCircuit = LoggerMessage.Define( + LogLevel.Error, + EventIds.LocationChangeFailed, + "Location change to {URI} in circuit {CircuitId} failed."); } - public static void UnhandledExceptionInvokingCircuitHandler(ILogger logger, CircuitHandler handler, string handlerMethod, Exception exception) + public static void InitializationStarted(ILogger logger) =>_intializationStarted(logger, null); + public static void InitializationSucceeded(ILogger logger) => _intializationSucceded(logger, null); + public static void InitializationFailed(ILogger logger, Exception exception) => _intializationFailed(logger, exception); + public static void DisposeStarted(ILogger logger, string circuitId) => _disposeStarted(logger, circuitId, null); + public static void DisposeSucceeded(ILogger logger, string circuitId) => _disposeSucceded(logger, circuitId, null); + public static void DisposeFailed(ILogger logger, string circuitId, Exception exception) => _disposeFailed(logger, circuitId, exception); + public static void CircuitOpened(ILogger logger, string circuitId) => _onCircuitOpened(logger, circuitId, null); + public static void ConnectionUp(ILogger logger, string circuitId, string connectionId) => _onConnectionUp(logger, circuitId, connectionId, null); + public static void ConnectionDown(ILogger logger, string circuitId, string connectionId) => _onConnectionDown(logger, circuitId, connectionId, null); + public static void CircuitClosed(ILogger logger, string circuitId) => _onCircuitClosed(logger, circuitId, null); + + public static void CircuitHandlerFailed(ILogger logger, CircuitHandler handler, string handlerMethod, Exception exception) { - _unhandledExceptionInvokingCircuitHandler( + _circuitHandlerFailed( logger, handler.GetType(), handlerMethod, @@ -511,27 +814,12 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits exception); } - public static void DisposingCircuit(ILogger logger, string circuitId) => _disposingCircuit(logger, circuitId, null); - - public static void CircuitOpened(ILogger logger, string circuitId) => _onCircuitOpened(logger, circuitId, null); - - public static void ConnectionUp(ILogger logger, string circuitId, string connectionId) => - _onConnectionUp(logger, circuitId, connectionId, null); - - public static void ConnectionDown(ILogger logger, string circuitId, string connectionId) => - _onConnectionDown(logger, circuitId, connectionId, null); - - public static void CircuitClosed(ILogger logger, string circuitId) => - _onCircuitClosed(logger, circuitId, null); - + public static void CircuitUnhandledException(ILogger logger, string circuitId, Exception exception) => _circuitUnhandledException(logger, circuitId, exception); + public static void CircuitUnhandledExceptionFailed(ILogger logger, string circuitId, Exception exception) => _circuitUnhandledExceptionFailed(logger, circuitId, exception); public static void EndInvokeDispatchException(ILogger logger, Exception ex) => _endInvokeDispatchException(logger, ex); - public static void EndInvokeJSFailed(ILogger logger, long asyncHandle, string arguments) => _endInvokeJSFailed(logger, asyncHandle, arguments, null); - public static void EndInvokeJSSucceeded(ILogger logger, long asyncCall) => _endInvokeJSSucceeded(logger, asyncCall, null); - public static void DispatchEventFailedToParseEventData(ILogger logger, Exception ex) => _dispatchEventFailedToParseEventData(logger, ex); - public static void DispatchEventFailedToDispatchEvent(ILogger logger, string eventHandlerId, Exception ex) => _dispatchEventFailedToDispatchEvent(logger, eventHandlerId ?? "", ex); public static void BeginInvokeDotNet(ILogger logger, string callId, string assemblyName, string methodIdentifier, long dotNetObjectId) @@ -546,11 +834,22 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits } } - public static void LocationChange(ILogger logger, string circuitId, string uri) => _locationChange(logger, circuitId, uri, null); + public static void BeginInvokeDotNetFailed(ILogger logger, string callId, string assemblyName, string methodIdentifier, long dotNetObjectId, Exception exception) + { + if (assemblyName != null) + { + _beginInvokeDotNetStaticFailed(logger, methodIdentifier, assemblyName, callId, null); + } + else + { + _beginInvokeDotNetInstanceFailed(logger, methodIdentifier, dotNetObjectId, callId, null); + } + } - public static void LocationChangeSucceeded(ILogger logger, string circuitId, string uri) => _locationChangeSucceeded(logger, circuitId, uri, null); - - public static void LocationChangeFailed(ILogger logger, string circuitId, string uri, Exception exception) => _locationChangeFailed(logger, circuitId, uri, exception); + public static void LocationChange(ILogger logger, string uri, string circuitId) => _locationChange(logger, uri, circuitId, null); + public static void LocationChangeSucceeded(ILogger logger, string uri, string circuitId) => _locationChangeSucceeded(logger, uri, circuitId, null); + public static void LocationChangeFailed(ILogger logger, string uri, string circuitId, Exception exception) => _locationChangeFailed(logger, uri, circuitId, exception); + public static void LocationChangeFailedInCircuit(ILogger logger, string uri, string circuitId, Exception exception) => _locationChangeFailedInCircuit(logger, uri, circuitId, exception); } } } diff --git a/src/Components/Server/src/Circuits/CircuitRegistry.cs b/src/Components/Server/src/Circuits/CircuitRegistry.cs index a5c970c4af..3e3461a7dc 100644 --- a/src/Components/Server/src/Circuits/CircuitRegistry.cs +++ b/src/Components/Server/src/Circuits/CircuitRegistry.cs @@ -79,6 +79,10 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits // This will likely never happen, except perhaps in unit tests, since CircuitIds are unique. throw new ArgumentException($"Circuit with identity {circuitHost.CircuitId} is already registered."); } + + // Register for unhandled exceptions from the circuit. The registry is responsible for tearing + // down the circuit on errors. + circuitHost.UnhandledException += CircuitHost_UnhandledException; } public virtual Task DisconnectAsync(CircuitHost circuitHost, string connectionId) @@ -154,6 +158,16 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits DisconnectedCircuits.Set(circuitHost.CircuitId, entry, entryOptions); } + // ConnectAsync is called from the CircuitHub - but the error handling story is a little bit complicated. + // We return the circuit from this method, but need to clean up the circuit on failure. So we don't want to + // throw from this method because we don't want to return a *failed* circuit. + // + // The solution is to handle exceptions here, and then return null to represent failure. + // + // 1. If the circuit id is invalue return null + // 2. If the circuit is not found return null + // 3. If the circuit is found, but fails to connect, we need to dispose it here and return null + // 4. If everything goes well, return the circuit. public virtual async Task ConnectAsync(string circuitId, IClientProxy clientProxy, string connectionId, CancellationToken cancellationToken) { Log.CircuitConnectStarted(_logger, circuitId); @@ -169,6 +183,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits Task circuitHandlerTask; + // We don't expect any of the logic inside the lock to throw, or run user code. lock (CircuitRegistryLock) { // Transition the host from disconnected to connected if it's available. In this critical section, we return @@ -188,7 +203,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits // b) out of order connection-up \ connection-down events e.g. a client that disconnects as soon it finishes reconnecting. // Dispatch the circuit handlers inside the sync context to ensure the order of execution. CircuitHost executes circuit handlers inside of - // + // the sync context. circuitHandlerTask = circuitHost.Renderer.Dispatcher.InvokeAsync(async () => { if (previouslyConnected) @@ -200,13 +215,22 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits await circuitHost.OnConnectionUpAsync(cancellationToken); }); - - Log.ReconnectionSucceeded(_logger, circuitId); } - await circuitHandlerTask; + try + { + await circuitHandlerTask; + Log.ReconnectionSucceeded(_logger, circuitId); + return circuitHost; + } + catch (Exception ex) + { + Log.FailedToReconnectToCircuit(_logger, circuitId, ex); + await TerminateAsync(circuitId); - return circuitHost; + // Return null on failure, because we need to clean up the circuit. + return null; + } } protected virtual (CircuitHost circuitHost, bool previouslyConnected) ConnectCore(string circuitId, IClientProxy clientProxy, string connectionId) @@ -268,6 +292,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits try { + entry.CircuitHost.UnhandledException -= CircuitHost_UnhandledException; await entry.CircuitHost.DisposeAsync(); } catch (Exception ex) @@ -288,7 +313,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits } } - public ValueTask Terminate(string circuitId) + public ValueTask TerminateAsync(string circuitId) { CircuitHost circuitHost; DisconnectedCircuitEntry entry = default; @@ -302,13 +327,33 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits Log.CircuitDisconnectedPermanently(_logger, circuitHost.CircuitId); circuitHost.Client.SetDisconnected(); } - else - { - return default; - } } - return circuitHost?.DisposeAsync() ?? default; + if (circuitHost != null) + { + circuitHost.UnhandledException -= CircuitHost_UnhandledException; + return circuitHost.DisposeAsync(); + } + + return default; + } + + // We don't need to do anything with the exception here, logging and sending exceptions to the client + // is done inside the circuit host. + private async void CircuitHost_UnhandledException(object sender, UnhandledExceptionEventArgs e) + { + var circuitHost = (CircuitHost)sender; + + try + { + // This will dispose the circuit and remove it from the registry. + await TerminateAsync(circuitHost.CircuitId); + } + catch (Exception ex) + { + // We don't expect TerminateAsync to throw, but we want exceptions here for completeness. + Log.CircuitExceptionHandlerFailed(_logger, circuitHost.CircuitId, ex); + } } private readonly struct DisconnectedCircuitEntry @@ -339,6 +384,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits private static readonly Action _circuitMarkedDisconnected; private static readonly Action _circuitDisconnectedPermanently; private static readonly Action _circuitEvicted; + private static readonly Action _circuitExceptionHandlerFailed; private static class EventIds { @@ -355,6 +401,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits public static readonly EventId CircuitMarkedDisconnected = new EventId(110, "CircuitMarkedDisconnected"); public static readonly EventId CircuitEvicted = new EventId(111, "CircuitEvicted"); public static readonly EventId CircuitDisconnectedPermanently = new EventId(112, "CircuitDisconnectedPermanently"); + public static readonly EventId CircuitExceptionHandlerFailed = new EventId(113, "CircuitExceptionHandlerFailed"); } static Log() @@ -428,6 +475,11 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits LogLevel.Debug, EventIds.CircuitEvicted, "Circuit with id {CircuitId} evicted due to {EvictionReason}."); + + _circuitExceptionHandlerFailed = LoggerMessage.Define( + LogLevel.Error, + EventIds.CircuitExceptionHandlerFailed, + "Exception handler for {CircuitId} failed."); } public static void UnhandledExceptionDisposingCircuitHost(ILogger logger, Exception exception) => @@ -448,8 +500,8 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits public static void ConnectingToDisconnectedCircuit(ILogger logger, string circuitId, string connectionId) => _connectingToDisconnectedCircuit(logger, circuitId, connectionId, null); - public static void FailedToReconnectToCircuit(ILogger logger, string circuitId) => - _failedToReconnectToCircuit(logger, circuitId, null); + public static void FailedToReconnectToCircuit(ILogger logger, string circuitId, Exception exception = null) => + _failedToReconnectToCircuit(logger, circuitId, exception); public static void ReconnectionSucceeded(ILogger logger, string circuitId) => _reconnectionSucceeded(logger, circuitId, null); @@ -471,6 +523,9 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits public static void CircuitEvicted(ILogger logger, string circuitId, EvictionReason evictionReason) => _circuitEvicted(logger, circuitId, evictionReason, null); + + public static void CircuitExceptionHandlerFailed(ILogger logger, string circuitId, Exception exception) => + _circuitExceptionHandlerFailed(logger, circuitId, exception); } } } diff --git a/src/Components/Server/src/Circuits/DefaultCircuitFactory.cs b/src/Components/Server/src/Circuits/DefaultCircuitFactory.cs index 43af5cc8f4..b5c14b0911 100644 --- a/src/Components/Server/src/Circuits/DefaultCircuitFactory.cs +++ b/src/Components/Server/src/Circuits/DefaultCircuitFactory.cs @@ -6,12 +6,9 @@ using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Text.Encodings.Web; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Components.Web; -using Microsoft.AspNetCore.Components.Web.Rendering; using Microsoft.AspNetCore.Components.Routing; +using Microsoft.AspNetCore.Components.Web.Rendering; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Http.Features; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; @@ -23,9 +20,9 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits { private readonly IServiceScopeFactory _scopeFactory; private readonly ILoggerFactory _loggerFactory; - private readonly ILogger _logger; private readonly CircuitIdFactory _circuitIdFactory; private readonly CircuitOptions _options; + private readonly ILogger _logger; public DefaultCircuitFactory( IServiceScopeFactory scopeFactory, @@ -34,10 +31,11 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits IOptions options) { _scopeFactory = scopeFactory ?? throw new ArgumentNullException(nameof(scopeFactory)); - _loggerFactory = loggerFactory; - _logger = _loggerFactory.CreateLogger(); + _loggerFactory = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory)); _circuitIdFactory = circuitIdFactory ?? throw new ArgumentNullException(nameof(circuitIdFactory)); - _options = options.Value; + _options = options?.Value ?? throw new ArgumentNullException(nameof(options)); + + _logger = _loggerFactory.CreateLogger(); } public override CircuitHost CreateCircuitHost( @@ -49,7 +47,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits { // We do as much intialization as possible eagerly in this method, which makes the error handling // story much simpler. If we throw from here, it's handled inside the initial hub method. - var components = ResolveComponentMetadata(httpContext, client); + var components = ResolveComponentMetadata(httpContext); var scope = _scopeFactory.CreateScope(); var encoder = scope.ServiceProvider.GetRequiredService(); @@ -88,6 +86,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits var circuitHost = new CircuitHost( _circuitIdFactory.CreateCircuitId(), scope, + _options, client, renderer, components, @@ -103,28 +102,17 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits return circuitHost; } - internal static List ResolveComponentMetadata(HttpContext httpContext, CircuitClientProxy client) + public static IReadOnlyList ResolveComponentMetadata(HttpContext httpContext) { - if (!client.Connected) + var endpoint = httpContext.GetEndpoint(); + if (endpoint == null) { - // This is the prerendering case. Descriptors will be registered by the prerenderer. - return new List(); + throw new InvalidOperationException( + $"{nameof(ComponentHub)} doesn't have an associated endpoint. " + + "Use 'app.UseEndpoints(endpoints => endpoints.MapBlazorHub(\"app\"))' to register your hub."); } - else - { - var endpointFeature = httpContext.Features.Get(); - var endpoint = endpointFeature?.Endpoint; - if (endpoint == null) - { - throw new InvalidOperationException( - $"{nameof(ComponentHub)} doesn't have an associated endpoint. " + - "Use 'app.UseEndpoints(endpoints => endpoints.MapBlazorHub(\"app\"))' to register your hub."); - } - var componentsMetadata = endpoint.Metadata.OfType().ToList(); - - return componentsMetadata; - } + return endpoint.Metadata.GetOrderedMetadata(); } private static class Log diff --git a/src/Components/Server/src/ComponentHub.cs b/src/Components/Server/src/ComponentHub.cs index f83fb5e210..a2ddc909ca 100644 --- a/src/Components/Server/src/ComponentHub.cs +++ b/src/Components/Server/src/ComponentHub.cs @@ -7,15 +7,35 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Components.Server.Circuits; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; +using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; namespace Microsoft.AspNetCore.Components.Server { - /// - /// A SignalR hub that accepts connections to an ASP.NET Core Components application. - /// + // Some notes about our expectations for error handling: + // + // In general, we need to prevent any client from interacting with a circuit that's in an unpredictable + // state. This means that when a circuit throws an unhandled exception our top priority is to + // unregister and dispose the circuit. This will prevent any new dispatches from the client + // from making it into application code. + // + // As part of this process, we also notify the client (if there is one) of the error, and we + // *expect* a well-behaved client to disconnect. A malicious client can't be expected to disconnect, + // but since we've unregistered the circuit they won't be able to access it anyway. When a call + // comes into any hub method and the circuit has been disassociated, we will abort the connection. + // It's safe to assume that's the result of a race condition or misbehaving client. + // + // Now it's important to remember that we can only abort a connection as part of a hub method call. + // We can dispose a circuit in the background, but we have to deal with a possible race condition + // any time we try to acquire access to the circuit - because it could have gone away in the + // background - outside of the scope of a hub method. + // + // In general we author our Hub methods as async methods, but we fire-and-forget anything that + // needs access to the circuit/application state to unblock the message loop. Using async in our + // Hub methods allows us to ensure message delivery to the client before we abort the connection + // in error cases. internal sealed class ComponentHub : Hub { private static readonly object CircuitKey = new object(); @@ -24,10 +44,6 @@ namespace Microsoft.AspNetCore.Components.Server private readonly CircuitOptions _options; private readonly ILogger _logger; - /// - /// Intended for framework use only. Applications should not instantiate - /// this class directly. - /// public ComponentHub( CircuitFactory circuitFactory, CircuitRegistry circuitRegistry, @@ -45,24 +61,11 @@ namespace Microsoft.AspNetCore.Components.Server /// public static PathString DefaultPath { get; } = "/_blazor"; - /// - /// For unit testing only. - /// - // We store the circuit host in Context.Items which is tied to the lifetime of the underlying - // SignalR connection. There's no need to clean this up, it's a non-owning reference and it - // will go away when the connection does. - internal CircuitHost CircuitHost - { - get => (CircuitHost)Context.Items[CircuitKey]; - private set => Context.Items[CircuitKey] = value; - } - - /// - /// Intended for framework use only. Applications should not call this method directly. - /// public override Task OnDisconnectedAsync(Exception exception) { - var circuitHost = CircuitHost; + // If the CircuitHost is gone now this isn't an error. This could happen if the disconnect + // if the result of well behaving client hanging up after an unhandled exception. + var circuitHost = GetCircuit(); if (circuitHost == null) { return Task.CompletedTask; @@ -71,15 +74,16 @@ namespace Microsoft.AspNetCore.Components.Server return _circuitRegistry.DisconnectAsync(circuitHost, Context.ConnectionId); } - /// - /// Intended for framework use only. Applications should not call this method directly. - /// - public string StartCircuit(string baseUri, string uri) + public async ValueTask StartCircuit(string baseUri, string uri) { - if (CircuitHost != null) + var circuitHost = GetCircuit(); + if (circuitHost != null) { - Log.CircuitAlreadyInitialized(_logger, CircuitHost.CircuitId); - NotifyClientError(Clients.Caller, $"The circuit host '{CircuitHost.CircuitId}' has already been initialized."); + // This is an error condition and an attempt to bind multiple circuits to a single connection. + // We can reject this and terminate the connection. + Log.CircuitAlreadyInitialized(_logger, circuitHost.CircuitId); + await NotifyClientError(Clients.Caller, $"The circuit host '{circuitHost.CircuitId}' has already been initialized."); + Context.Abort(); return null; } @@ -90,34 +94,33 @@ namespace Microsoft.AspNetCore.Components.Server { // We do some really minimal validation here to prevent obviously wrong data from getting in // without duplicating too much logic. + // + // This is an error condition attempting to initialize the circuit in a way that would fail. + // We can reject this and terminate the connection. Log.InvalidInputData(_logger); - _ = NotifyClientError(Clients.Caller, $"The uris provided are invalid."); + await NotifyClientError(Clients.Caller, $"The uris provided are invalid."); + Context.Abort(); return null; } - var circuitClient = new CircuitClientProxy(Clients.Caller, Context.ConnectionId); - if (DefaultCircuitFactory.ResolveComponentMetadata(Context.GetHttpContext(), circuitClient).Count == 0) + // From this point, we can try to actually initialize the circuit. + if (DefaultCircuitFactory.ResolveComponentMetadata(Context.GetHttpContext()).Count == 0) { - var endpointFeature = Context.GetHttpContext().Features.Get(); - var endpoint = endpointFeature?.Endpoint; - - Log.NoComponentsRegisteredInEndpoint(_logger, endpoint.DisplayName); - // No components preregistered so return. This is totally normal if the components were prerendered. + Log.NoComponentsRegisteredInEndpoint(_logger, Context.GetHttpContext().GetEndpoint()?.DisplayName); return null; } try { - var circuitHost = _circuitFactory.CreateCircuitHost( + var circuitClient = new CircuitClientProxy(Clients.Caller, Context.ConnectionId); + circuitHost = _circuitFactory.CreateCircuitHost( Context.GetHttpContext(), circuitClient, baseUri, uri, Context.User); - circuitHost.UnhandledException += CircuitHost_UnhandledException; - // Fire-and-forget the initialization process, because we can't block the // SignalR message loop (we'd get a deadlock if any of the initialization // logic relied on receiving a subsequent message from SignalR), and it will @@ -127,141 +130,136 @@ namespace Microsoft.AspNetCore.Components.Server // It's safe to *publish* the circuit now because nothing will be able // to run inside it until after InitializeAsync completes. _circuitRegistry.Register(circuitHost); - CircuitHost = circuitHost; + SetCircuit(circuitHost); return circuitHost.CircuitId; } catch (Exception ex) { + // If the circuit fails to initialize synchronously we can notify the client immediately + // and shut down the connection. Log.CircuitInitializationFailed(_logger, ex); - NotifyClientError(Clients.Caller, "The circuit failed to initialize."); + await NotifyClientError(Clients.Caller, "The circuit failed to initialize."); + Context.Abort(); return null; } } - /// - /// Intended for framework use only. Applications should not call this method directly. - /// - public async Task ConnectCircuit(string circuitId) + public async ValueTask ConnectCircuit(string circuitId) { + // ConnectionAsync will not throw. var circuitHost = await _circuitRegistry.ConnectAsync(circuitId, Clients.Caller, Context.ConnectionId, Context.ConnectionAborted); if (circuitHost != null) { - CircuitHost = circuitHost; - CircuitHost.UnhandledException += CircuitHost_UnhandledException; - + SetCircuit(circuitHost); circuitHost.SetCircuitUser(Context.User); circuitHost.SendPendingBatches(); return true; } + // If we get here the circuit does not exist anymore. This is something that's valid for a client to + // recover from, and the client is not holding any resources right now other than the connection. return false; } - /// - /// Intended for framework use only. Applications should not call this method directly. - /// - public void BeginInvokeDotNetFromJS(string callId, string assemblyName, string methodIdentifier, long dotNetObjectId, string argsJson) + public async ValueTask BeginInvokeDotNetFromJS(string callId, string assemblyName, string methodIdentifier, long dotNetObjectId, string argsJson) { - if (CircuitHost == null) + var circuitHost = await GetActiveCircuitAsync(); + if (circuitHost == null) { - Log.CircuitHostNotInitialized(_logger); - _ = NotifyClientError(Clients.Caller, "Circuit not initialized."); return; } - _ = CircuitHost.BeginInvokeDotNetFromJS(callId, assemblyName, methodIdentifier, dotNetObjectId, argsJson); + _ = circuitHost.BeginInvokeDotNetFromJS(callId, assemblyName, methodIdentifier, dotNetObjectId, argsJson); } - /// - /// Intended for framework use only. Applications should not call this method directly. - /// - public void EndInvokeJSFromDotNet(long asyncHandle, bool succeeded, string arguments) + public async ValueTask EndInvokeJSFromDotNet(long asyncHandle, bool succeeded, string arguments) { - if (CircuitHost == null) + var circuitHost = await GetActiveCircuitAsync(); + if (circuitHost == null) { - Log.CircuitHostNotInitialized(_logger); - _ = NotifyClientError(Clients.Caller, "Circuit not initialized."); return; } - _ = CircuitHost.EndInvokeJSFromDotNet(asyncHandle, succeeded, arguments); + _ = circuitHost.EndInvokeJSFromDotNet(asyncHandle, succeeded, arguments); } - /// - /// Intended for framework use only. Applications should not call this method directly. - /// - public void DispatchBrowserEvent(string eventDescriptor, string eventArgs) + public async ValueTask DispatchBrowserEvent(string eventDescriptor, string eventArgs) { - if (CircuitHost == null) + var circuitHost = await GetActiveCircuitAsync(); + if (circuitHost == null) { - Log.CircuitHostNotInitialized(_logger); - _ = NotifyClientError(Clients.Caller, "Circuit not initialized."); return; } - _ = CircuitHost.DispatchEvent(eventDescriptor, eventArgs); + _ = circuitHost.DispatchEvent(eventDescriptor, eventArgs); } - /// - /// Intended for framework use only. Applications should not call this method directly. - /// - public void OnRenderCompleted(long renderId, string errorMessageOrNull) + public async ValueTask OnRenderCompleted(long renderId, string errorMessageOrNull) { - if (CircuitHost == null) + var circuitHost = await GetActiveCircuitAsync(); + if (circuitHost == null) { - Log.CircuitHostNotInitialized(_logger); - NotifyClientError(Clients.Caller, "Circuit not initialized."); return; } Log.ReceivedConfirmationForBatch(_logger, renderId); - _ = CircuitHost.Renderer.OnRenderCompleted(renderId, errorMessageOrNull); + _ = circuitHost.Renderer.OnRenderCompleted(renderId, errorMessageOrNull); } - public void OnLocationChanged(string uri, bool intercepted) + public async ValueTask OnLocationChanged(string uri, bool intercepted) { - if (CircuitHost == null) + var circuitHost = await GetActiveCircuitAsync(); + if (circuitHost == null) { - Log.CircuitHostNotInitialized(_logger); - NotifyClientError(Clients.Caller, "Circuit not initialized."); return; } - _ = CircuitHost.OnLocationChangedAsync(uri, intercepted); + _ = circuitHost.OnLocationChangedAsync(uri, intercepted); } - private async void CircuitHost_UnhandledException(object sender, UnhandledExceptionEventArgs e) + // We store the CircuitHost through a *handle* here because Context.Items is tied to the lifetime + // of the connection. It's possible that a misbehaving client could cause disposal of a CircuitHost + // but keep a connection open indefinitely, preventing GC of the Circuit and related application state. + // Using a handle allows the CircuitHost to clear this reference in the background. + // + // See comment on error handling on the class definition. + private async ValueTask GetActiveCircuitAsync([CallerMemberName] string callSite = "") { - var circuitHost = (CircuitHost)sender; - var circuitId = circuitHost?.CircuitId; - - try + var handle = (CircuitHandle)Context.Items[CircuitKey]; + var circuitHost = handle?.CircuitHost; + if (handle != null && circuitHost == null) { - Log.UnhandledExceptionInCircuit(_logger, circuitId, (Exception)e.ExceptionObject); - if (_options.DetailedErrors) - { - await NotifyClientError(circuitHost.Client, e.ExceptionObject.ToString()); - } - else - { - var message = $"There was an unhandled exception on the current circuit, so this circuit will be terminated. For more details turn on " + - $"detailed exceptions in '{typeof(CircuitOptions).Name}.{nameof(CircuitOptions.DetailedErrors)}'"; - - await NotifyClientError(circuitHost.Client, message); - } - - // We generally can't abort the connection here since this is an async - // callback. The Hub has already been torn down. We'll rely on the - // client to abort the connection if we successfully transmit an error. + // This can occur when a circuit host does not exist anymore due to an unhandled exception. + // We can reject this and terminate the connection. + Log.CircuitHostShutdown(_logger, callSite); + await NotifyClientError(Clients.Caller, "Circuit has been shut down due to error."); + Context.Abort(); + return null; } - catch (Exception ex) + else if (circuitHost == null) { - Log.FailedToTransmitException(_logger, circuitId, ex); + // This can occur when a circuit host does not exist anymore due to an unhandled exception. + // We can reject this and terminate the connection. + Log.CircuitHostNotInitialized(_logger, callSite); + await NotifyClientError(Clients.Caller, "Circuit not initialized."); + Context.Abort(); + return null; } + + return circuitHost; } - private static Task NotifyClientError(IClientProxy client, string error) => - client.SendAsync("JS.Error", error); + private CircuitHost GetCircuit() + { + return ((CircuitHandle)Context.Items[CircuitKey])?.CircuitHost; + } + + private void SetCircuit(CircuitHost circuitHost) + { + Context.Items[CircuitKey] = circuitHost?.Handle; + } + + private static Task NotifyClientError(IClientProxy client, string error) => client.SendAsync("JS.Error", error); private static class Log { @@ -274,14 +272,14 @@ namespace Microsoft.AspNetCore.Components.Server private static readonly Action _unhandledExceptionInCircuit = LoggerMessage.Define(LogLevel.Warning, new EventId(3, "UnhandledExceptionInCircuit"), "Unhandled exception in circuit {CircuitId}"); - private static readonly Action _failedToTransmitException = - LoggerMessage.Define(LogLevel.Debug, new EventId(4, "FailedToTransmitException"), "Failed to transmit exception to client in circuit {CircuitId}"); - private static readonly Action _circuitAlreadyInitialized = - LoggerMessage.Define(LogLevel.Debug, new EventId(5, "CircuitAlreadyInitialized"), "The circuit host '{CircuitId}' has already been initialized"); + LoggerMessage.Define(LogLevel.Debug, new EventId(4, "CircuitAlreadyInitialized"), "The circuit host '{CircuitId}' has already been initialized"); private static readonly Action _circuitHostNotInitialized = - LoggerMessage.Define(LogLevel.Debug, new EventId(6, "CircuitHostNotInitialized"), "Call to '{CallSite}' received before the circuit host initialization"); + LoggerMessage.Define(LogLevel.Debug, new EventId(5, "CircuitHostNotInitialized"), "Call to '{CallSite}' received before the circuit host initialization"); + + private static readonly Action _circuitHostShutdown = + LoggerMessage.Define(LogLevel.Debug, new EventId(6, "CircuitHostShutdown"), "Call to '{CallSite}' received after the circuit was shut down"); private static readonly Action _circuitTerminatedGracefully = LoggerMessage.Define(LogLevel.Debug, new EventId(7, "CircuitTerminatedGracefully"), "Circuit '{CircuitId}' terminated gracefully"); @@ -307,15 +305,12 @@ namespace Microsoft.AspNetCore.Components.Server _unhandledExceptionInCircuit(logger, circuitId, exception); } - public static void FailedToTransmitException(ILogger logger, string circuitId, Exception transmissionException) - { - _failedToTransmitException(logger, circuitId, transmissionException); - } - public static void CircuitAlreadyInitialized(ILogger logger, string circuitId) => _circuitAlreadyInitialized(logger, circuitId, null); public static void CircuitHostNotInitialized(ILogger logger, [CallerMemberName] string callSite = "") => _circuitHostNotInitialized(logger, callSite, null); + public static void CircuitHostShutdown(ILogger logger, [CallerMemberName] string callSite = "") => _circuitHostShutdown(logger, callSite, null); + public static void CircuitTerminatedGracefully(ILogger logger, string circuitId) => _circuitTerminatedGracefully(logger, circuitId, null); public static void InvalidInputData(ILogger logger, [CallerMemberName] string callSite = "") => _invalidInputData(logger, callSite, null); diff --git a/src/Components/Server/test/Circuits/CircuitHostTest.cs b/src/Components/Server/test/Circuits/CircuitHostTest.cs index 3c2ca28992..9a1973e2f4 100644 --- a/src/Components/Server/test/Circuits/CircuitHostTest.cs +++ b/src/Components/Server/test/Circuits/CircuitHostTest.cs @@ -38,10 +38,11 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits // Assert serviceScope.Verify(s => s.Dispose(), Times.Once()); Assert.True(remoteRenderer.Disposed); + Assert.Null(circuitHost.Handle.CircuitHost); } [Fact] - public async Task DisposeAsync_DisposesResourcesEvenIfCircuitHandlerOrComponentThrows() + public async Task DisposeAsync_DisposesResourcesAndSilencesException() { // Arrange var serviceScope = new Mock(); @@ -60,10 +61,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits circuitHost.Renderer.AssignRootComponentId(throwOnDisposeComponent); // Act - await Assert.ThrowsAsync(async () => - { - await circuitHost.DisposeAsync(); - }); + await circuitHost.DisposeAsync(); // Does not throw // Assert Assert.True(throwOnDisposeComponent.DidCallDispose); @@ -181,7 +179,8 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits await initializeAsyncTask; // Assert: The async exception was reported via the side-channel - Assert.Same(ex, reportedErrors.Single().ExceptionObject); + var aex = Assert.IsType(reportedErrors.Single().ExceptionObject); + Assert.Same(ex, aex.InnerExceptions.Single()); Assert.False(reportedErrors.Single().IsTerminating); } diff --git a/src/Components/Server/test/Circuits/CircuitRegistryTest.cs b/src/Components/Server/test/Circuits/CircuitRegistryTest.cs index eb7828a570..6efdf212a0 100644 --- a/src/Components/Server/test/Circuits/CircuitRegistryTest.cs +++ b/src/Components/Server/test/Circuits/CircuitRegistryTest.cs @@ -133,6 +133,30 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits handler.Verify(v => v.OnCircuitClosedAsync(It.IsAny(), It.IsAny()), Times.Never()); } + [Fact] + public async Task ConnectAsync_InvokesCircuitHandlers_DisposesCircuitOnFailure() + { + // Arrange + var circuitIdFactory = TestCircuitIdFactory.CreateTestFactory(); + var registry = CreateRegistry(circuitIdFactory); + var handler = new Mock { CallBase = true }; + handler.Setup(h => h.OnConnectionUpAsync(It.IsAny(), It.IsAny())).Throws(new InvalidTimeZoneException()); + var circuitHost = TestCircuitHost.Create(circuitIdFactory.CreateCircuitId(), handlers: new[] { handler.Object }); + registry.Register(circuitHost); + + var newClient = Mock.Of(); + var newConnectionId = "new-id"; + + // Act + var result = await registry.ConnectAsync(circuitHost.CircuitId, newClient, newConnectionId, default); + + // Assert + Assert.Null(result); + Assert.Null(circuitHost.Handle.CircuitHost); // Will be null if disposed. + Assert.Empty(registry.ConnectedCircuits); + Assert.Equal(0, registry.DisconnectedCircuits.Count); + } + [Fact] public async Task DisconnectAsync_DoesNothing_IfCircuitIsInactive() { @@ -409,7 +433,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits protected override void OnEntryEvicted(object key, object value, EvictionReason reason, object state) { base.OnEntryEvicted(key, value, reason, state); - OnAfterEntryEvicted(); + OnAfterEntryEvicted?.Invoke(); } } diff --git a/src/Components/Server/test/Circuits/TestCircuitHost.cs b/src/Components/Server/test/Circuits/TestCircuitHost.cs index 3e9896e9df..8e04f6ca2d 100644 --- a/src/Components/Server/test/Circuits/TestCircuitHost.cs +++ b/src/Components/Server/test/Circuits/TestCircuitHost.cs @@ -3,9 +3,7 @@ using System; using System.Collections.Generic; -using System.Runtime.ExceptionServices; using System.Text.Encodings.Web; -using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.Web.Rendering; using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.DependencyInjection; @@ -18,16 +16,11 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits { internal class TestCircuitHost : CircuitHost { - private TestCircuitHost(string circuitId, IServiceScope scope, CircuitClientProxy client, RemoteRenderer renderer, IReadOnlyList descriptors, RemoteJSRuntime jsRuntime, CircuitHandler[] circuitHandlers, ILogger logger) - : base(circuitId, scope, client, renderer, descriptors, jsRuntime, circuitHandlers, logger) + private TestCircuitHost(string circuitId, IServiceScope scope, CircuitOptions options, CircuitClientProxy client, RemoteRenderer renderer, IReadOnlyList descriptors, RemoteJSRuntime jsRuntime, CircuitHandler[] circuitHandlers, ILogger logger) + : base(circuitId, scope, options, client, renderer, descriptors, jsRuntime, circuitHandlers, logger) { } - protected override void OnHandlerError(CircuitHandler circuitHandler, string handlerMethod, Exception ex) - { - ExceptionDispatchInfo.Capture(ex).Throw(); - } - public static CircuitHost Create( string circuitId = null, IServiceScope serviceScope = null, @@ -55,6 +48,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits return new TestCircuitHost( circuitId ?? Guid.NewGuid().ToString(), serviceScope, + new CircuitOptions(), clientProxy, remoteRenderer, new List(), diff --git a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj index fc3a9c6dfa..29f54b1df1 100644 --- a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj +++ b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj @@ -16,9 +16,10 @@ - + false + @@ -29,6 +30,7 @@ + diff --git a/src/Components/test/E2ETest/ServerExecutionTests/ComponentHubReliabilityTest.cs b/src/Components/test/E2ETest/ServerExecutionTests/ComponentHubReliabilityTest.cs index 3984f32d43..2c579568c0 100644 --- a/src/Components/test/E2ETest/ServerExecutionTests/ComponentHubReliabilityTest.cs +++ b/src/Components/test/E2ETest/ServerExecutionTests/ComponentHubReliabilityTest.cs @@ -2,7 +2,10 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.Collections.Concurrent; using System.Collections.Generic; +using System.Data; +using System.Text.RegularExpressions; using System.Threading.Tasks; using Ignitor; using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; @@ -11,26 +14,29 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Testing; using Xunit; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests { public class ComponentHubReliabilityTest : IClassFixture, IDisposable { - private static readonly TimeSpan DefaultLatencyTimeout = TimeSpan.FromMilliseconds(500); + private static readonly TimeSpan DefaultLatencyTimeout = TimeSpan.FromSeconds(10); private readonly AspNetSiteServerFixture _serverFixture; - public ComponentHubReliabilityTest(AspNetSiteServerFixture serverFixture) + public ComponentHubReliabilityTest(AspNetSiteServerFixture serverFixture, ITestOutputHelper output) { - serverFixture.BuildWebHostMethod = TestServer.Program.BuildWebHost; _serverFixture = serverFixture; + Output = output; + + serverFixture.BuildWebHostMethod = TestServer.Program.BuildWebHost; CreateDefaultConfiguration(); } public BlazorClient Client { get; set; } - + public ITestOutputHelper Output { get; set; } private IList Batches { get; set; } = new List(); private IList Errors { get; set; } = new List(); - private IList Logs { get; set; } = new List(); + private ConcurrentQueue Logs { get; set; } = new ConcurrentQueue(); public TestSink TestSink { get; set; } @@ -39,13 +45,24 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests Client = new BlazorClient() { DefaultLatencyTimeout = DefaultLatencyTimeout }; Client.RenderBatchReceived += (id, data) => Batches.Add(new Batch(id, data)); Client.OnCircuitError += (error) => Errors.Add(error); + Client.LoggerProvider = new XunitLoggerProvider(Output); + Client.FormatError = (error) => + { + var logs = string.Join(Environment.NewLine, Logs); + return new Exception(error + Environment.NewLine + logs); + }; _ = _serverFixture.RootUri; // this is needed for the side-effects of getting the URI. TestSink = _serverFixture.Host.Services.GetRequiredService(); TestSink.MessageLogged += LogMessages; } - private void LogMessages(WriteContext context) => Logs.Add(new LogMessage(context.LogLevel, context.Message, context.Exception)); + private void LogMessages(WriteContext context) + { + var log = new LogMessage(context.LogLevel, context.Message, context.Exception); + Logs.Enqueue(log); + Output.WriteLine(log.ToString()); + } [Fact] public async Task CannotStartMultipleCircuits() @@ -58,7 +75,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests Assert.Single(Batches); // Act - await Client.ExpectCircuitError(() => Client.HubConnection.SendAsync( + await Client.ExpectCircuitErrorAndDisconnect(() => Client.HubConnection.SendAsync( "StartCircuit", baseUri, baseUri + "/home")); @@ -79,25 +96,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests Assert.True(await Client.ConnectAsync(uri, prerendered: false, connectAutomatically: false), "Couldn't connect to the app"); // Act - await Client.ExpectCircuitError(() => Client.HubConnection.SendAsync("StartCircuit", null, null)); - - // Assert - var actualError = Assert.Single(Errors); - Assert.Matches(expectedError, actualError); - Assert.DoesNotContain(Logs, l => l.LogLevel > LogLevel.Information); - } - - [Fact] - public async Task CannotStartCircuitWithInvalidUris() - { - // Arrange - var expectedError = "The uris provided are invalid."; - var rootUri = _serverFixture.RootUri; - var uri = new Uri(rootUri, "/subdir"); - Assert.True(await Client.ConnectAsync(uri, prerendered: false, connectAutomatically: false), "Couldn't connect to the app"); - - // Act - await Client.ExpectCircuitError(() => Client.HubConnection.SendAsync("StartCircuit", uri.AbsoluteUri, "/foo")); + await Client.ExpectCircuitErrorAndDisconnect(() => Client.HubConnection.SendAsync("StartCircuit", null, null)); // Assert var actualError = Assert.Single(Errors); @@ -119,7 +118,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests // Act // // These are valid URIs by the BaseUri doesn't contain the Uri - so it fails to initialize. - await Client.ExpectCircuitError(() => Client.HubConnection.SendAsync("StartCircuit", uri, "http://example.com"), TimeSpan.FromHours(1)); + await Client.ExpectCircuitErrorAndDisconnect(() => Client.HubConnection.SendAsync("StartCircuit", uri, "http://example.com")); // Assert var actualError = Assert.Single(Errors); @@ -138,7 +137,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests Assert.Empty(Batches); // Act - await Client.ExpectCircuitError(() => Client.HubConnection.SendAsync( + await Client.ExpectCircuitErrorAndDisconnect(() => Client.HubConnection.SendAsync( "BeginInvokeDotNetFromJS", "", "", @@ -164,7 +163,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests Assert.Empty(Batches); // Act - await Client.ExpectCircuitError(() => Client.HubConnection.SendAsync( + await Client.ExpectCircuitErrorAndDisconnect(() => Client.HubConnection.SendAsync( "EndInvokeJSFromDotNet", 3, true, @@ -188,7 +187,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests Assert.Empty(Batches); // Act - await Client.ExpectCircuitError(() => Client.HubConnection.SendAsync( + await Client.ExpectCircuitErrorAndDisconnect(() => Client.HubConnection.SendAsync( "DispatchBrowserEvent", "", "")); @@ -201,7 +200,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests } [Fact] - public async Task CannotInvokeOnRenderCompletedInitialization() + public async Task CannotInvokeOnRenderCompletedBeforeInitialization() { // Arrange var expectedError = "Circuit not initialized."; @@ -211,7 +210,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests Assert.Empty(Batches); // Act - await Client.ExpectCircuitError(() => Client.HubConnection.SendAsync( + await Client.ExpectCircuitErrorAndDisconnect(() => Client.HubConnection.SendAsync( "OnRenderCompleted", 5, null)); @@ -234,7 +233,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests Assert.Empty(Batches); // Act - await Client.ExpectCircuitError(() => Client.HubConnection.SendAsync( + await Client.ExpectCircuitErrorAndDisconnect(() => Client.HubConnection.SendAsync( "OnLocationChanged", baseUri.AbsoluteUri, false)); @@ -246,6 +245,129 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests Assert.Contains(Logs, l => (l.LogLevel, l.Message) == (LogLevel.Debug, "Call to 'OnLocationChanged' received before the circuit host initialization")); } + [Fact] + public async Task OnLocationChanged_ReportsDebugForExceptionInValidation() + { + // Arrange + var expectedError = "Location change to http://example.com failed."; + var rootUri = _serverFixture.RootUri; + var baseUri = new Uri(rootUri, "/subdir"); + Assert.True(await Client.ConnectAsync(baseUri, prerendered: false), "Couldn't connect to the app"); + Assert.Single(Batches); + + // Act + await Client.ExpectCircuitError(() => Client.HubConnection.SendAsync( + "OnLocationChanged", + "http://example.com", + false)); + + // Assert + var actualError = Assert.Single(Errors); + Assert.Equal(expectedError, actualError); + Assert.DoesNotContain(Logs, l => l.LogLevel > LogLevel.Information); + Assert.Contains(Logs, l => + { + return l.LogLevel == LogLevel.Debug && Regex.IsMatch(l.Message, "Location change to http://example.com in circuit .* failed."); + }); + } + + [Fact] + public async Task OnLocationChanged_ReportsErrorForExceptionInUserCode() + { + // Arrange + var expectedError = "There was an unhandled exception .?"; + var rootUri = _serverFixture.RootUri; + var baseUri = new Uri(rootUri, "/subdir"); + Assert.True(await Client.ConnectAsync(baseUri, prerendered: false), "Couldn't connect to the app"); + Assert.Single(Batches); + + await Client.SelectAsync("test-selector-select", "BasicTestApp.NavigationFailureComponent"); + + // Act + await Client.ExpectCircuitError(() => Client.HubConnection.SendAsync( + "OnLocationChanged", + new Uri(baseUri, "/test").AbsoluteUri, + false)); + + // Assert + var actualError = Assert.Single(Errors); + Assert.Matches(expectedError, actualError); + Assert.Contains(Logs, l => + { + return l.LogLevel == LogLevel.Error && Regex.IsMatch(l.Message, "Unhandled exception in circuit .*"); + }); + } + + [Theory] + [InlineData("constructor-throw")] + [InlineData("attach-throw")] + [InlineData("setparameters-sync-throw")] + [InlineData("setparameters-async-throw")] + [InlineData("render-throw")] + [InlineData("afterrender-sync-throw")] + [InlineData("afterrender-async-throw")] + public async Task ComponentLifecycleMethodThrowsExceptionTerminatesTheCircuit(string id) + { + // Arrange + var expectedError = "Unhandled exception in circuit .*"; + var rootUri = _serverFixture.RootUri; + var baseUri = new Uri(rootUri, "/subdir"); + Assert.True(await Client.ConnectAsync(baseUri, prerendered: false), "Couldn't connect to the app"); + Assert.Single(Batches); + + await Client.SelectAsync("test-selector-select", "BasicTestApp.ReliabilityComponent"); + + // Act + await Client.ExpectCircuitError(async () => + { + await Client.ClickAsync(id, expectRenderBatch: false); + }); + + // Now if you try to click again, you will get *forcibly* disconnected for trying to talk to + // a circuit that's gone. + await Client.ExpectCircuitErrorAndDisconnect(async () => + { + await Assert.ThrowsAsync(async () => await Client.ClickAsync(id, expectRenderBatch: false)); + }); + + // Checking logs at the end to avoid race condition. + Assert.Contains( + Logs, + e => LogLevel.Error == e.LogLevel && Regex.IsMatch(e.Message, expectedError)); + } + + [Fact] + public async Task ComponentDisposeMethodThrowsExceptionTerminatesTheCircuit() + { + // Arrange + var expectedError = "Unhandled exception in circuit .*"; + var rootUri = _serverFixture.RootUri; + var baseUri = new Uri(rootUri, "/subdir"); + Assert.True(await Client.ConnectAsync(baseUri, prerendered: false), "Couldn't connect to the app"); + Assert.Single(Batches); + + await Client.SelectAsync("test-selector-select", "BasicTestApp.ReliabilityComponent"); + + // Act - show then hide + await Client.ClickAsync("dispose-throw"); + await Client.ExpectCircuitError(async () => + { + await Client.ClickAsync("dispose-throw", expectRenderBatch: false); + }); + + // Now if you try to click again, you will get *forcibly* disconnected for trying to talk to + // a circuit that's gone. + await Client.ExpectCircuitErrorAndDisconnect(async () => + { + await Assert.ThrowsAsync(async () => await Client.ClickAsync("dispose-throw", expectRenderBatch: false)); + }); + + // Checking logs at the end to avoid race condition. + Assert.Contains( + Logs, + e => LogLevel.Error == e.LogLevel && Regex.IsMatch(e.Message, expectedError)); + } + public void Dispose() { TestSink.MessageLogged -= LogMessages; @@ -263,6 +385,11 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests public LogLevel LogLevel { get; set; } public string Message { get; set; } public Exception Exception { get; set; } + + public override string ToString() + { + return $"{LogLevel}: {Message}{(Exception != null ? Environment.NewLine : "")}{Exception}"; + } } private class Batch diff --git a/src/Components/test/E2ETest/ServerExecutionTests/InteropReliabilityTests.cs b/src/Components/test/E2ETest/ServerExecutionTests/InteropReliabilityTests.cs index ee4f4a00ed..3d589988b8 100644 --- a/src/Components/test/E2ETest/ServerExecutionTests/InteropReliabilityTests.cs +++ b/src/Components/test/E2ETest/ServerExecutionTests/InteropReliabilityTests.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Text.Json; @@ -10,28 +11,63 @@ using Ignitor; using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.SignalR.Client; -using Microsoft.AspNetCore.Testing; -using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Testing; using Xunit; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests { - [Flaky("https://github.com/aspnet/AspNetCore/issues/12940", FlakyOn.All)] - public class InteropReliabilityTests : IClassFixture + public class InteropReliabilityTests : IClassFixture, IDisposable { - private static readonly TimeSpan DefaultLatencyTimeout = TimeSpan.FromSeconds(5); + private static readonly TimeSpan DefaultLatencyTimeout = TimeSpan.FromSeconds(30); private readonly AspNetSiteServerFixture _serverFixture; - public InteropReliabilityTests(AspNetSiteServerFixture serverFixture) + public InteropReliabilityTests(AspNetSiteServerFixture serverFixture, ITestOutputHelper output) { - serverFixture.BuildWebHostMethod = TestServer.Program.BuildWebHost; _serverFixture = serverFixture; + Output = output; + + serverFixture.BuildWebHostMethod = TestServer.Program.BuildWebHost; + CreateDefaultConfiguration(); } - public BlazorClient Client { get; set; } = new BlazorClient() { DefaultLatencyTimeout = DefaultLatencyTimeout }; + public BlazorClient Client { get; set; } + public ITestOutputHelper Output { get; set; } + private IList Batches { get; set; } = new List(); + private List DotNetCompletions = new List(); + private List JSInteropCalls = new List(); + private IList Errors { get; set; } = new List(); + private ConcurrentQueue Logs { get; set; } = new ConcurrentQueue(); + + public TestSink TestSink { get; set; } + + private void CreateDefaultConfiguration() + { + Client = new BlazorClient() { DefaultLatencyTimeout = DefaultLatencyTimeout }; + Client.RenderBatchReceived += (id, data) => Batches.Add(new Batch(id, data)); + Client.DotNetInteropCompletion += (method) => DotNetCompletions.Add(new DotNetCompletion(method)); + Client.JSInterop += (asyncHandle, identifier, argsJson) => JSInteropCalls.Add(new JSInteropCall(asyncHandle, identifier, argsJson)); + Client.OnCircuitError += (error) => Errors.Add(error); + Client.LoggerProvider = new XunitLoggerProvider(Output); + Client.FormatError = (error) => + { + var logs = string.Join(Environment.NewLine, Logs); + return new Exception(error + Environment.NewLine + logs); + }; + + _ = _serverFixture.RootUri; // this is needed for the side-effects of getting the URI. + TestSink = _serverFixture.Host.Services.GetRequiredService(); + TestSink.MessageLogged += LogMessages; + } + + private void LogMessages(WriteContext context) + { + var log = new LogMessage(context.LogLevel, context.Message, context.Exception); + Logs.Enqueue(log); + Output.WriteLine(log.ToString()); + } [Fact] public async Task CannotInvokeNonJSInvokableMethods() @@ -40,8 +76,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests var expectedError = "[\"1\"," + "false," + "\"There was an exception invoking \\u0027WriteAllText\\u0027 on assembly \\u0027System.IO.FileSystem\\u0027. For more details turn on detailed exceptions in \\u0027CircuitOptions.DetailedErrors\\u0027\"]"; - var (_, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + await GoToTestComponent(Batches); // Act await Client.InvokeDotNetMethod( @@ -52,9 +87,8 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests JsonSerializer.Serialize(new[] { ".\\log.txt", "log" })); // Assert - Assert.Single(dotNetCompletions, expectedError); - - await ValidateClientKeepsWorking(Client, batches); + Assert.Single(DotNetCompletions, c => c.Message == expectedError); + await ValidateClientKeepsWorking(Client, Batches); } [Fact] @@ -64,8 +98,8 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests var expectedError = "[\"1\"," + "false," + "\"There was an exception invoking \\u0027MadeUpMethod\\u0027 on assembly \\u0027BasicTestApp\\u0027. For more details turn on detailed exceptions in \\u0027CircuitOptions.DetailedErrors\\u0027\"]"; - var (_, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + + await GoToTestComponent(Batches); // Act await Client.InvokeDotNetMethod( @@ -76,19 +110,19 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests JsonSerializer.Serialize(new[] { ".\\log.txt", "log" })); // Assert - Assert.Single(dotNetCompletions, expectedError); - await ValidateClientKeepsWorking(Client, batches); + Assert.Single(DotNetCompletions, c => c.Message == expectedError); + await ValidateClientKeepsWorking(Client, Batches); } - [Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/12940")] + [Fact] public async Task CannotInvokeJSInvokableMethodsWithWrongNumberOfArguments() { // Arrange var expectedError = "[\"1\"," + "false," + "\"There was an exception invoking \\u0027NotifyLocationChanged\\u0027 on assembly \\u0027Microsoft.AspNetCore.Components.Server\\u0027. For more details turn on detailed exceptions in \\u0027CircuitOptions.DetailedErrors\\u0027\"]"; - var (_, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + + await GoToTestComponent(Batches); // Act await Client.InvokeDotNetMethod( @@ -99,9 +133,8 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests JsonSerializer.Serialize(new[] { _serverFixture.RootUri })); // Assert - Assert.Single(dotNetCompletions, expectedError); - - await ValidateClientKeepsWorking(Client, batches); + Assert.Single(DotNetCompletions, c => c.Message == expectedError); + await ValidateClientKeepsWorking(Client, Batches); } [Fact] @@ -111,8 +144,8 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests var expectedError = "[\"1\"," + "false," + "\"There was an exception invoking \\u0027NotifyLocationChanged\\u0027 on assembly \\u0027\\u0027. For more details turn on detailed exceptions in \\u0027CircuitOptions.DetailedErrors\\u0027\"]"; - var (_, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + + await GoToTestComponent(Batches); // Act await Client.InvokeDotNetMethod( @@ -123,9 +156,8 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests JsonSerializer.Serialize(new object[] { _serverFixture.RootUri + "counter", false })); // Assert - Assert.Single(dotNetCompletions, expectedError); - - await ValidateClientKeepsWorking(Client, batches); + Assert.Single(DotNetCompletions, c => c.Message == expectedError); + await ValidateClientKeepsWorking(Client, Batches); } [Fact] @@ -135,8 +167,8 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests var expectedError = "[\"1\"," + "false," + "\"There was an exception invoking \\u0027\\u0027 on assembly \\u0027Microsoft.AspNetCore.Components.Server\\u0027. For more details turn on detailed exceptions in \\u0027CircuitOptions.DetailedErrors\\u0027\"]"; - var (_, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + + await GoToTestComponent(Batches); // Act await Client.InvokeDotNetMethod( @@ -147,9 +179,9 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests JsonSerializer.Serialize(new object[] { _serverFixture.RootUri + "counter", false })); // Assert - Assert.Single(dotNetCompletions, expectedError); + Assert.Single(DotNetCompletions, c => c.Message == expectedError); - await ValidateClientKeepsWorking(Client, batches); + await ValidateClientKeepsWorking(Client, Batches); } [Fact] @@ -160,8 +192,8 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests var expectedError = "[\"1\"," + "false," + "\"There was an exception invoking \\u0027Reverse\\u0027 on assembly \\u0027\\u0027. For more details turn on detailed exceptions in \\u0027CircuitOptions.DetailedErrors\\u0027\"]"; - var (_, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + + await GoToTestComponent(Batches); // Act await Client.InvokeDotNetMethod( @@ -171,7 +203,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests null, JsonSerializer.Serialize(Array.Empty())); - Assert.Single(dotNetCompletions, expectedDotNetObjectRef); + Assert.Single(DotNetCompletions, c => c.Message == expectedDotNetObjectRef); await Client.InvokeDotNetMethod( "1", @@ -181,7 +213,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests JsonSerializer.Serialize(Array.Empty())); // Assert - Assert.Single(dotNetCompletions, "[\"1\",true,\"tnatropmI\"]"); + Assert.Single(DotNetCompletions, c => c.Message == "[\"1\",true,\"tnatropmI\"]"); await Client.InvokeDotNetMethod( "1", @@ -190,9 +222,8 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests 3, // non existing ref JsonSerializer.Serialize(Array.Empty())); - Assert.Single(dotNetCompletions, expectedError); - - await ValidateClientKeepsWorking(Client, batches); + Assert.Single(DotNetCompletions, c => c.Message == expectedError); + await ValidateClientKeepsWorking(Client, Batches); } [Fact] @@ -204,8 +235,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests "false," + "\"There was an exception invoking \\u0027ReceiveTrivial\\u0027 on assembly \\u0027BasicTestApp\\u0027. For more details turn on detailed exceptions in \\u0027CircuitOptions.DetailedErrors\\u0027\"]"; - var (interopCalls, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + await GoToTestComponent(Batches); await Client.InvokeDotNetMethod( "1", @@ -214,7 +244,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests null, JsonSerializer.Serialize(Array.Empty())); - Assert.Single(dotNetCompletions, expectedImportantDotNetObjectRef); + Assert.Single(DotNetCompletions, c => c.Message == expectedImportantDotNetObjectRef); // Act await Client.InvokeDotNetMethod( @@ -225,9 +255,8 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests JsonSerializer.Serialize(new object[] { new { __dotNetObject = 1 } })); // Assert - Assert.Single(dotNetCompletions, expectedError); - - await ValidateClientKeepsWorking(Client, batches); + Assert.Single(DotNetCompletions, c => c.Message == expectedError); + await ValidateClientKeepsWorking(Client, Batches); } [Fact] @@ -236,16 +265,15 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests // Arrange var expectedError = "An exception occurred executing JS interop: The JSON value could not be converted to System.Int32. Path: $ | LineNumber: 0 | BytePositionInLine: 3.. See InnerException for more details."; - var (interopCalls, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + await GoToTestComponent(Batches); // Act await Client.ClickAsync("triggerjsinterop-malformed"); - var call = interopCalls.FirstOrDefault(call => call.identifier == "sendMalformedCallbackReturn"); + var call = JSInteropCalls.FirstOrDefault(call => call.Identifier == "sendMalformedCallbackReturn"); Assert.NotEqual(default, call); - var id = call.id; + var id = call.AsyncHandle; await Client.HubConnection.InvokeAsync( "EndInvokeJSFromDotNet", id, @@ -256,41 +284,25 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests Client.FindElementById("errormessage-malformed").Children.OfType(), e => expectedError == e.TextContent); - await ValidateClientKeepsWorking(Client, batches); + await ValidateClientKeepsWorking(Client, Batches); } - [Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/12940")] - public async Task LogsJSInteropCompletionsCallbacksAndContinuesWorkingInAllSituations() + [Fact] + public async Task JSInteropCompletionSuccess() { // Arrange - - var (interopCalls, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + await GoToTestComponent(Batches); var sink = _serverFixture.Host.Services.GetRequiredService(); var logEvents = new List<(LogLevel logLevel, string)>(); sink.MessageLogged += (wc) => logEvents.Add((wc.LogLevel, wc.EventId.Name)); // Act - await Client.ClickAsync("triggerjsinterop-malformed"); + await Client.ClickAsync("triggerjsinterop-success"); - var call = interopCalls.FirstOrDefault(call => call.identifier == "sendMalformedCallbackReturn"); + var call = JSInteropCalls.FirstOrDefault(call => call.Identifier == "sendSuccessCallbackReturn"); Assert.NotEqual(default, call); - var id = call.id; - await Client.HubConnection.InvokeAsync( - "EndInvokeJSFromDotNet", - id, - true, - $"[{id}, true, }}"); - - // A completely malformed payload like the one above never gets to the application. - Assert.Single( - Client.FindElementById("errormessage-malformed").Children.OfType(), - e => "" == e.TextContent); - - Assert.Contains((LogLevel.Debug, "EndInvokeDispatchException"), logEvents); - - await Client.ClickAsync("triggerjsinterop-success"); + var id = call.AsyncHandle; await Client.HubConnection.InvokeAsync( "EndInvokeJSFromDotNet", id++, @@ -302,13 +314,32 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests e => "" == e.TextContent); Assert.Contains((LogLevel.Debug, "EndInvokeJSSucceeded"), logEvents); + } + [Fact] + public async Task JSInteropThrowsInUserCode() + { + // Arrange + await GoToTestComponent(Batches); + var sink = _serverFixture.Host.Services.GetRequiredService(); + var logEvents = new List<(LogLevel logLevel, string)>(); + sink.MessageLogged += (wc) => logEvents.Add((wc.LogLevel, wc.EventId.Name)); + + // Act await Client.ClickAsync("triggerjsinterop-failure"); - await Client.HubConnection.InvokeAsync( - "EndInvokeJSFromDotNet", - id++, - false, - $"[{id}, false, \"There was an error invoking sendFailureCallbackReturn\"]"); + + var call = JSInteropCalls.FirstOrDefault(call => call.Identifier == "sendFailureCallbackReturn"); + Assert.NotEqual(default, call); + + var id = call.AsyncHandle; + await Client.ExpectRenderBatch(async () => + { + await Client.HubConnection.InvokeAsync( + "EndInvokeJSFromDotNet", + id, + false, + $"[{id}, false, \"There was an error invoking sendFailureCallbackReturn\"]"); + }); Assert.Single( Client.FindElementById("errormessage-failure").Children.OfType(), @@ -318,7 +349,45 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests Assert.DoesNotContain(logEvents, m => m.logLevel > LogLevel.Information); - await ValidateClientKeepsWorking(Client, batches); + await ValidateClientKeepsWorking(Client, Batches); + } + + [Fact] + public async Task MalformedJSInteropCallbackDisposesCircuit() + { + // Arrange + await GoToTestComponent(Batches); + var sink = _serverFixture.Host.Services.GetRequiredService(); + var logEvents = new List<(LogLevel logLevel, string)>(); + sink.MessageLogged += (wc) => logEvents.Add((wc.LogLevel, wc.EventId.Name)); + + // Act + await Client.ClickAsync("triggerjsinterop-malformed"); + + var call = JSInteropCalls.FirstOrDefault(call => call.Identifier == "sendMalformedCallbackReturn"); + Assert.NotEqual(default, call); + + var id = call.AsyncHandle; + await Client.ExpectCircuitError(async () => + { + await Client.HubConnection.InvokeAsync( + "EndInvokeJSFromDotNet", + id, + true, + $"[{id}, true, }}"); + }); + + // A completely malformed payload like the one above never gets to the application. + Assert.Single( + Client.FindElementById("errormessage-malformed").Children.OfType(), + e => "" == e.TextContent); + + Assert.Contains((LogLevel.Debug, "EndInvokeDispatchException"), logEvents); + + await Client.ExpectCircuitErrorAndDisconnect(async () => + { + await Assert.ThrowsAsync(() => Client.ClickAsync("event-handler-throw-sync", expectRenderBatch: true)); + }); } [Fact] @@ -329,8 +398,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests "false," + "\"There was an exception invoking \\u0027NotifyLocationChanged\\u0027 on assembly \\u0027Microsoft.AspNetCore.Components.Server\\u0027. For more details turn on detailed exceptions in \\u0027CircuitOptions.DetailedErrors\\u0027\"]"; - var (_, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + await GoToTestComponent(Batches); // Act await Client.InvokeDotNetMethod( @@ -341,8 +409,8 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests "[ \"invalidPayload\"}"); // Assert - Assert.Single(dotNetCompletions, expectedError); - await ValidateClientKeepsWorking(Client, batches); + Assert.Single(DotNetCompletions, c => c.Message == expectedError); + await ValidateClientKeepsWorking(Client, Batches); } [Fact] @@ -353,8 +421,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests "false," + "\"There was an exception invoking \\u0027ReceiveTrivial\\u0027 on assembly \\u0027BasicTestApp\\u0027. For more details turn on detailed exceptions in \\u0027CircuitOptions.DetailedErrors\\u0027\"]"; - var (_, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + await GoToTestComponent(Batches); // Act await Client.InvokeDotNetMethod( @@ -365,62 +432,73 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests "[ { \"data\": {\"}} ]"); // Assert - Assert.Single(dotNetCompletions, expectedError); - await ValidateClientKeepsWorking(Client, batches); + Assert.Single(DotNetCompletions, c => c.Message == expectedError); + await ValidateClientKeepsWorking(Client, Batches); } [Fact] - public async Task DispatchingEventsWithInvalidPayloadsDoesNotCrashTheCircuit() + public async Task DispatchingEventsWithInvalidPayloadsShutsDownCircuitGracefully() { // Arrange - var (interopCalls, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + await GoToTestComponent(Batches); var sink = _serverFixture.Host.Services.GetRequiredService(); var logEvents = new List<(LogLevel logLevel, string)>(); sink.MessageLogged += (wc) => logEvents.Add((wc.LogLevel, wc.EventId.Name)); // Act - await Client.HubConnection.InvokeAsync( + await Client.ExpectCircuitError(async () => + { + await Client.HubConnection.InvokeAsync( "DispatchBrowserEvent", null, null); + }); Assert.Contains( (LogLevel.Debug, "DispatchEventFailedToParseEventData"), logEvents); - await ValidateClientKeepsWorking(Client, batches); + // Taking any other action will fail because the circuit is disposed. + await Client.ExpectCircuitErrorAndDisconnect(async () => + { + await Assert.ThrowsAsync(() => Client.ClickAsync("event-handler-throw-sync", expectRenderBatch: true)); + }); } [Fact] public async Task DispatchingEventsWithInvalidEventDescriptor() { // Arrange - var (interopCalls, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + await GoToTestComponent(Batches); var sink = _serverFixture.Host.Services.GetRequiredService(); var logEvents = new List<(LogLevel logLevel, string)>(); sink.MessageLogged += (wc) => logEvents.Add((wc.LogLevel, wc.EventId.Name)); // Act - await Client.HubConnection.InvokeAsync( + await Client.ExpectCircuitError(async () => + { + await Client.HubConnection.InvokeAsync( "DispatchBrowserEvent", "{Invalid:{\"payload}", "{}"); + }); Assert.Contains( (LogLevel.Debug, "DispatchEventFailedToParseEventData"), logEvents); - await ValidateClientKeepsWorking(Client, batches); + // Taking any other action will fail because the circuit is disposed. + await Client.ExpectCircuitErrorAndDisconnect(async () => + { + await Assert.ThrowsAsync(() => Client.ClickAsync("event-handler-throw-sync", expectRenderBatch: true)); + }); } [Fact] public async Task DispatchingEventsWithInvalidEventArgs() { // Arrange - var (interopCalls, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + await GoToTestComponent(Batches); var sink = _serverFixture.Host.Services.GetRequiredService(); var logEvents = new List<(LogLevel logLevel, string)>(); sink.MessageLogged += (wc) => logEvents.Add((wc.LogLevel, wc.EventId.Name)); @@ -433,24 +511,30 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests EventArgsType = "mouse", }; - await Client.HubConnection.InvokeAsync( - "DispatchBrowserEvent", - JsonSerializer.Serialize(browserDescriptor, TestJsonSerializerOptionsProvider.Options), - "{Invalid:{\"payload}"); + await Client.ExpectCircuitError(async () => + { + await Client.HubConnection.InvokeAsync( + "DispatchBrowserEvent", + JsonSerializer.Serialize(browserDescriptor, TestJsonSerializerOptionsProvider.Options), + "{Invalid:{\"payload}"); + }); Assert.Contains( (LogLevel.Debug, "DispatchEventFailedToParseEventData"), logEvents); - await ValidateClientKeepsWorking(Client, batches); + // Taking any other action will fail because the circuit is disposed. + await Client.ExpectCircuitErrorAndDisconnect(async () => + { + await Assert.ThrowsAsync(() => Client.ClickAsync("event-handler-throw-sync", expectRenderBatch: true)); + }); } - [Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/12940")] + [Fact] public async Task DispatchingEventsWithInvalidEventHandlerId() { // Arrange - var (interopCalls, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + await GoToTestComponent(Batches); var sink = _serverFixture.Host.Services.GetRequiredService(); var logEvents = new List<(LogLevel logLevel, string eventIdName, Exception exception)>(); sink.MessageLogged += (wc) => logEvents.Add((wc.LogLevel, wc.EventId.Name, wc.Exception)); @@ -468,25 +552,31 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests EventArgsType = "mouse", }; - await Client.HubConnection.InvokeAsync( + await Client.ExpectCircuitError(async () => + { + await Client.HubConnection.InvokeAsync( "DispatchBrowserEvent", JsonSerializer.Serialize(browserDescriptor, TestJsonSerializerOptionsProvider.Options), JsonSerializer.Serialize(mouseEventArgs, TestJsonSerializerOptionsProvider.Options)); + }); Assert.Contains( logEvents, e => e.eventIdName == "DispatchEventFailedToDispatchEvent" && e.logLevel == LogLevel.Debug && e.exception is ArgumentException ae && ae.Message.Contains("There is no event handler with ID 1")); - await ValidateClientKeepsWorking(Client, batches); + // Taking any other action will fail because the circuit is disposed. + await Client.ExpectCircuitErrorAndDisconnect(async () => + { + await Assert.ThrowsAsync(() => Client.ClickAsync("event-handler-throw-sync", expectRenderBatch: true)); + }); } [Fact] public async Task EventHandlerThrowsSyncExceptionTerminatesTheCircuit() { // Arrange - var (interopCalls, dotNetCompletions, batches) = ConfigureClient(); - await GoToTestComponent(batches); + await GoToTestComponent(Batches); var sink = _serverFixture.Host.Services.GetRequiredService(); var logEvents = new List<(LogLevel logLevel, string eventIdName, Exception exception)>(); sink.MessageLogged += (wc) => logEvents.Add((wc.LogLevel, wc.EventId.Name, wc.Exception)); @@ -496,12 +586,19 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests Assert.Contains( logEvents, - e => LogLevel.Warning == e.logLevel && - "UnhandledExceptionInCircuit" == e.eventIdName && + e => LogLevel.Error == e.logLevel && + "CircuitUnhandledException" == e.eventIdName && "Handler threw an exception" == e.exception.Message); + + // Now if you try to click again, you will get *forcibly* disconnected for trying to talk to + // a circuit that's gone. + await Client.ExpectCircuitErrorAndDisconnect(async () => + { + await Assert.ThrowsAsync(() => Client.ClickAsync("event-handler-throw-sync", expectRenderBatch: true)); + }); } - private Task ValidateClientKeepsWorking(BlazorClient Client, List<(int, byte[])> batches) => + private Task ValidateClientKeepsWorking(BlazorClient Client, IList batches) => ValidateClientKeepsWorking(Client, () => batches.Count); private async Task ValidateClientKeepsWorking(BlazorClient Client, Func countAccessor) @@ -512,7 +609,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests Assert.Equal(currentBatches + 1, countAccessor()); } - private async Task GoToTestComponent(List<(int, byte[])> batches) + private async Task GoToTestComponent(IList batches) { var rootUri = _serverFixture.RootUri; Assert.True(await Client.ConnectAsync(new Uri(rootUri, "/subdir"), prerendered: false), "Couldn't connect to the app"); @@ -522,15 +619,64 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests Assert.Equal(2, batches.Count); } - private (List<(int id, string identifier, string args)>, List, List<(int, byte[])>) ConfigureClient() + public void Dispose() { - var interopCalls = new List<(int, string, string)>(); - Client.JSInterop += (int arg1, string arg2, string arg3) => interopCalls.Add((arg1, arg2, arg3)); - var batches = new List<(int, byte[])>(); - Client.RenderBatchReceived += (renderer, data) => batches.Add((renderer, data)); - var endInvokeDotNetCompletions = new List(); - Client.DotNetInteropCompletion += (completion) => endInvokeDotNetCompletions.Add(completion); - return (interopCalls, endInvokeDotNetCompletions, batches); + TestSink.MessageLogged -= LogMessages; + } + + private class LogMessage + { + public LogMessage(LogLevel logLevel, string message, Exception exception) + { + LogLevel = logLevel; + Message = message; + Exception = exception; + } + + public LogLevel LogLevel { get; set; } + public string Message { get; set; } + public Exception Exception { get; set; } + + public override string ToString() + { + return $"{LogLevel}: {Message}{(Exception != null ? Environment.NewLine : "")}{Exception}"; + } + } + + private class Batch + { + public Batch(int id, byte[] data) + { + Id = id; + Data = data; + } + + public int Id { get; } + public byte[] Data { get; } + } + + private class DotNetCompletion + { + public DotNetCompletion(string message) + { + Message = message; + } + + public string Message { get; } + } + + private class JSInteropCall + { + public JSInteropCall(int asyncHandle, string identifier, string argsJson) + { + AsyncHandle = asyncHandle; + Identifier = identifier; + ArgsJson = argsJson; + } + + public int AsyncHandle { get; } + public string Identifier { get; } + public string ArgsJson { get; } } } } diff --git a/src/Components/test/testassets/BasicTestApp/Index.razor b/src/Components/test/testassets/BasicTestApp/Index.razor index 2d125580ab..5acfe91fa0 100644 --- a/src/Components/test/testassets/BasicTestApp/Index.razor +++ b/src/Components/test/testassets/BasicTestApp/Index.razor @@ -51,6 +51,7 @@ + diff --git a/src/Components/test/testassets/BasicTestApp/NavigationFailureComponent.razor b/src/Components/test/testassets/BasicTestApp/NavigationFailureComponent.razor new file mode 100644 index 0000000000..f62cb87eb2 --- /dev/null +++ b/src/Components/test/testassets/BasicTestApp/NavigationFailureComponent.razor @@ -0,0 +1,28 @@ +@implements IDisposable +@inject NavigationManager Navigation +@using Microsoft.AspNetCore.Components.Routing +

+ This component is used to test the behaviour when you attach to NavigationManager.LocationChanged + and throw an exception. We have a special code path to recognize this case and treat it as a failure + in user code rather than invalid input. + + This component is used headless tests for error handling. Markup that's provided here is for manually + testing this case in the browser. +

+ +Click here for some fireworks. + +@code { + + protected override void OnInitialized() + { + Navigation.LocationChanged += NavigationManager_LocationChanged; + } + + private void NavigationManager_LocationChanged(object sender, LocationChangedEventArgs e) + { + throw new InvalidTimeZoneException(); + } + + void IDisposable.Dispose() => Navigation.LocationChanged -= NavigationManager_LocationChanged; +} diff --git a/src/Components/test/testassets/BasicTestApp/ServerReliability/ReliabilityComponent.razor b/src/Components/test/testassets/BasicTestApp/ServerReliability/ReliabilityComponent.razor index 63be3a8b6c..8557fa95c0 100644 --- a/src/Components/test/testassets/BasicTestApp/ServerReliability/ReliabilityComponent.razor +++ b/src/Components/test/testassets/BasicTestApp/ServerReliability/ReliabilityComponent.razor @@ -1,6 +1,8 @@ @using Microsoft.JSInterop @inject IJSRuntime JSRuntime @namespace BasicTestApp +@using BasicTestApp.ServerReliability +

Server reliability

This component is used on the server-side execution model to validate that the circuit is resilient to failures, intentional or not. @@ -23,12 +25,68 @@ + +@if (showConstructorThrow) +{ + +} + + +@if (showAttachThrow) +{ + +} + + +@if (showSetParametersSyncThrow) +{ + +} + + +@if (showSetParametersAsyncThrow) +{ + +} + + +@if (showRenderThrow) +{ + +} + + +@if (showOnAfterRenderSyncThrow) +{ + +} + + +@if (showOnAfterRenderAsyncThrow) +{ + +} + + +@if (showDisposeThrow) +{ + +} + @code { int currentCount = 0; string errorMalformed = ""; string errorSuccess = ""; string errorFailure = ""; + bool showConstructorThrow; + bool showAttachThrow; + bool showSetParametersSyncThrow; + bool showSetParametersAsyncThrow; + bool showRenderThrow; + bool showOnAfterRenderSyncThrow; + bool showOnAfterRenderAsyncThrow; + bool showDisposeThrow; void IncrementCount() { diff --git a/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingAttachComponent.cs b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingAttachComponent.cs new file mode 100644 index 0000000000..598ce7aadc --- /dev/null +++ b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingAttachComponent.cs @@ -0,0 +1,19 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; + +namespace BasicTestApp.ServerReliability +{ + public class ThrowingAttachComponent : IComponent + { + public void Attach(RenderHandle renderHandle) + { + throw new InvalidTimeZoneException(); + } + + public Task SetParametersAsync(ParameterView parameters) + { + throw new NotImplementedException(); + } + } +} diff --git a/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingConstructorComponent.cs b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingConstructorComponent.cs new file mode 100644 index 0000000000..0101296c76 --- /dev/null +++ b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingConstructorComponent.cs @@ -0,0 +1,24 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; + +namespace BasicTestApp.ServerReliability +{ + public class ThrowingConstructorComponent : IComponent + { + public ThrowingConstructorComponent() + { + throw new InvalidTimeZoneException(); + } + + public void Attach(RenderHandle renderHandle) + { + throw new NotImplementedException(); + } + + public Task SetParametersAsync(ParameterView parameters) + { + throw new NotImplementedException(); + } + } +} diff --git a/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingDisposeComponent.cs b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingDisposeComponent.cs new file mode 100644 index 0000000000..1d52b03fa7 --- /dev/null +++ b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingDisposeComponent.cs @@ -0,0 +1,27 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; + +namespace BasicTestApp.ServerReliability +{ + public class ThrowingDisposeComponent : IComponent, IDisposable + { + public void Attach(RenderHandle renderHandle) + { + renderHandle.Render(builder => + { + // Do nothing. + }); + } + + public void Dispose() + { + throw new InvalidTimeZoneException(); + } + + public Task SetParametersAsync(ParameterView parameters) + { + return Task.CompletedTask; + } + } +} diff --git a/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingOnAfterRenderAsyncComponent.cs b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingOnAfterRenderAsyncComponent.cs new file mode 100644 index 0000000000..ab1c454779 --- /dev/null +++ b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingOnAfterRenderAsyncComponent.cs @@ -0,0 +1,28 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; + +namespace BasicTestApp.ServerReliability +{ + public class ThrowingOnAfterRenderAsyncComponent : IComponent, IHandleAfterRender + { + public void Attach(RenderHandle renderHandle) + { + renderHandle.Render(builder => + { + // Do nothing. + }); + } + + public async Task OnAfterRenderAsync() + { + await Task.Yield(); + throw new InvalidTimeZoneException(); + } + + public Task SetParametersAsync(ParameterView parameters) + { + return Task.CompletedTask; + } + } +} diff --git a/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingOnAfterRenderSyncComponent.cs b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingOnAfterRenderSyncComponent.cs new file mode 100644 index 0000000000..3ddcd2ddf3 --- /dev/null +++ b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingOnAfterRenderSyncComponent.cs @@ -0,0 +1,27 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; + +namespace BasicTestApp.ServerReliability +{ + public class ThrowingOnAfterRenderSyncComponent : IComponent, IHandleAfterRender + { + public void Attach(RenderHandle renderHandle) + { + renderHandle.Render(builder => + { + // Do nothing. + }); + } + + public Task OnAfterRenderAsync() + { + throw new InvalidTimeZoneException(); + } + + public Task SetParametersAsync(ParameterView parameters) + { + return Task.CompletedTask; + } + } +} diff --git a/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingRenderComponent.cs b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingRenderComponent.cs new file mode 100644 index 0000000000..9dcb1056ec --- /dev/null +++ b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingRenderComponent.cs @@ -0,0 +1,22 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; + +namespace BasicTestApp.ServerReliability +{ + public class ThrowingRenderComponent : IComponent + { + public void Attach(RenderHandle renderHandle) + { + renderHandle.Render(builder => + { + throw new InvalidTimeZoneException(); + }); + } + + public Task SetParametersAsync(ParameterView parameters) + { + return Task.CompletedTask; + } + } +} diff --git a/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingSetParametersAsyncComponent.cs b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingSetParametersAsyncComponent.cs new file mode 100644 index 0000000000..09cd9269fb --- /dev/null +++ b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingSetParametersAsyncComponent.cs @@ -0,0 +1,19 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; + +namespace BasicTestApp.ServerReliability +{ + public class ThrowingSetParametersAsyncComponent : IComponent + { + public void Attach(RenderHandle renderHandle) + { + } + + public async Task SetParametersAsync(ParameterView parameters) + { + await Task.Yield(); + throw new InvalidTimeZoneException(); + } + } +} diff --git a/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingSetParametersSyncComponent.cs b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingSetParametersSyncComponent.cs new file mode 100644 index 0000000000..83f46d522a --- /dev/null +++ b/src/Components/test/testassets/BasicTestApp/ServerReliability/ThrowingSetParametersSyncComponent.cs @@ -0,0 +1,18 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; + +namespace BasicTestApp.ServerReliability +{ + public class ThrowingSetParametersSyncComponent : IComponent + { + public void Attach(RenderHandle renderHandle) + { + } + + public Task SetParametersAsync(ParameterView parameters) + { + throw new InvalidTimeZoneException(); + } + } +} diff --git a/src/Components/test/testassets/Ignitor/BlazorClient.cs b/src/Components/test/testassets/Ignitor/BlazorClient.cs index e6867ef73b..fa4e45f248 100644 --- a/src/Components/test/testassets/Ignitor/BlazorClient.cs +++ b/src/Components/test/testassets/Ignitor/BlazorClient.cs @@ -26,12 +26,12 @@ namespace Ignitor { TaskCompletionSource.TrySetCanceled(); }); - - ImplicitWait = DefaultLatencyTimeout != null; } public TimeSpan? DefaultLatencyTimeout { get; set; } = TimeSpan.FromMilliseconds(500); + public Func FormatError { get; set; } + private CancellationTokenSource CancellationTokenSource { get; } private CancellationToken CancellationToken => CancellationTokenSource.Token; @@ -42,10 +42,14 @@ namespace Ignitor private CancellableOperation NextErrorReceived { get; set; } + private CancellableOperation NextDisconnect { get; set; } + private CancellableOperation NextJSInteropReceived { get; set; } private CancellableOperation NextDotNetInteropCompletionReceived { get; set; } + public ILoggerProvider LoggerProvider { get; set; } + public bool ConfirmRenderBatch { get; set; } = true; public event Action JSInterop; @@ -60,7 +64,7 @@ namespace Ignitor public ElementHive Hive { get; set; } = new ElementHive(); - public bool ImplicitWait { get; set; } + public bool ImplicitWait => DefaultLatencyTimeout != null; public HubConnection HubConnection { get; set; } @@ -112,6 +116,18 @@ namespace Ignitor return NextErrorReceived.Completion.Task; } + public Task PrepareForNextDisconnect(TimeSpan? timeout) + { + if (NextDisconnect?.Completion != null) + { + throw new InvalidOperationException("Invalid state previous task not completed"); + } + + NextDisconnect = new CancellableOperation(timeout); + + return NextDisconnect.Completion.Task; + } + public Task ClickAsync(string elementId, bool expectRenderBatch = true) { if (!Hive.TryFindElementById(elementId, out var elementNode)) @@ -128,14 +144,14 @@ namespace Ignitor } } - public async Task SelectAsync(string elementId, string value) + public Task SelectAsync(string elementId, string value) { if (!Hive.TryFindElementById(elementId, out var elementNode)) { throw new InvalidOperationException($"Could not find element with id {elementId}."); } - await ExpectRenderBatch(() => elementNode.SelectAsync(HubConnection, value)); + return ExpectRenderBatch(() => elementNode.SelectAsync(HubConnection, value)); } public async Task ExpectRenderBatch(Func action, TimeSpan? timeout = null) @@ -166,6 +182,22 @@ namespace Ignitor await task; } + public async Task ExpectCircuitErrorAndDisconnect(Func action, TimeSpan? timeout = null) + { + // NOTE: timeout is used for each operation individually. + await ExpectDisconnect(async () => + { + await ExpectCircuitError(action, timeout); + }, timeout); + } + + public async Task ExpectDisconnect(Func action, TimeSpan? timeout = null) + { + var task = WaitForDisconnect(timeout); + await action(); + await task; + } + private Task WaitForRenderBatch(TimeSpan? timeout = null) { if (ImplicitWait) @@ -220,12 +252,32 @@ namespace Ignitor } } + private async Task WaitForDisconnect(TimeSpan? timeout = null) + { + if (ImplicitWait) + { + if (DefaultLatencyTimeout == null && timeout == null) + { + throw new InvalidOperationException("Implicit wait without DefaultLatencyTimeout is not allowed."); + } + } + + await PrepareForNextDisconnect(timeout ?? DefaultLatencyTimeout); + } + public async Task ConnectAsync(Uri uri, bool prerendered, bool connectAutomatically = true) { var builder = new HubConnectionBuilder(); builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton()); builder.WithUrl(GetHubUrl(uri)); - builder.ConfigureLogging(l => l.AddConsole().SetMinimumLevel(LogLevel.Trace)); + builder.ConfigureLogging(l => + { + l.SetMinimumLevel(LogLevel.Trace); + if (LoggerProvider != null) + { + l.AddProvider(LoggerProvider); + } + }); HubConnection = builder.Build(); await HubConnection.StartAsync(CancellationToken); @@ -260,53 +312,32 @@ namespace Ignitor private void OnEndInvokeDotNet(string completion) { - try - { - DotNetInteropCompletion?.Invoke(completion); + DotNetInteropCompletion?.Invoke(completion); - NextDotNetInteropCompletionReceived?.Completion?.TrySetResult(null); - } - catch (Exception e) - { - NextDotNetInteropCompletionReceived?.Completion?.TrySetException(e); - } + NextDotNetInteropCompletionReceived?.Completion?.TrySetResult(null); } private void OnBeginInvokeJS(int asyncHandle, string identifier, string argsJson) { - try - { - JSInterop?.Invoke(asyncHandle, identifier, argsJson); + JSInterop?.Invoke(asyncHandle, identifier, argsJson); - NextJSInteropReceived?.Completion?.TrySetResult(null); - } - catch (Exception e) - { - NextJSInteropReceived?.Completion?.TrySetException(e); - } + NextJSInteropReceived?.Completion?.TrySetResult(null); } private void OnRenderBatch(int batchId, byte[] batchData) { - try + RenderBatchReceived?.Invoke(batchId, batchData); + + var batch = RenderBatchReader.Read(batchData); + + Hive.Update(batch); + + if (ConfirmRenderBatch) { - RenderBatchReceived?.Invoke(batchId, batchData); - - var batch = RenderBatchReader.Read(batchData); - - Hive.Update(batch); - - if (ConfirmRenderBatch) - { - _ = ConfirmBatch(batchId); - } - - NextBatchReceived?.Completion?.TrySetResult(null); - } - catch (Exception e) - { - NextBatchReceived?.Completion?.TrySetResult(e); + _ = ConfirmBatch(batchId); } + + NextBatchReceived?.Completion?.TrySetResult(null); } public Task ConfirmBatch(int batchId, string error = null) @@ -316,20 +347,19 @@ namespace Ignitor private void OnError(string error) { - try - { - OnCircuitError?.Invoke(error); + OnCircuitError?.Invoke(error); - NextErrorReceived?.Completion?.TrySetResult(null); - } - catch (Exception e) - { - NextErrorReceived?.Completion?.TrySetResult(e); - } + var exception = FormatError?.Invoke(error) ?? new Exception(error); + NextBatchReceived?.Completion?.TrySetException(exception); + NextDotNetInteropCompletionReceived?.Completion.TrySetException(exception); + NextJSInteropReceived?.Completion.TrySetException(exception); + NextErrorReceived?.Completion?.TrySetResult(null); } private Task OnClosedAsync(Exception ex) { + NextDisconnect?.Completion?.TrySetResult(null); + if (ex == null) { TaskCompletionSource.TrySetResult(null); From 9b4ec6ec713d3c3bedc3ac5622c38ef5b4666192 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Sat, 10 Aug 2019 17:51:02 -0700 Subject: [PATCH 06/24] Add semaphore to selenium tests This change prevents thread pool starvation when running a bunch of selenium-based tests, by turning the blocking wait for a WebDriver to start into an async wait. This also seems to help with speed, and reliability since we're not running too many browsers at once. I was experencing timeouts, and seeing them in the debugger while running tests locally, this no longer happens. --- src/Shared/E2ETesting/BrowserTestBase.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Shared/E2ETesting/BrowserTestBase.cs b/src/Shared/E2ETesting/BrowserTestBase.cs index 6299b4b020..8e94a4bfb2 100644 --- a/src/Shared/E2ETesting/BrowserTestBase.cs +++ b/src/Shared/E2ETesting/BrowserTestBase.cs @@ -21,6 +21,11 @@ namespace Microsoft.AspNetCore.E2ETesting private static readonly AsyncLocal _logs = new AsyncLocal(); private static readonly AsyncLocal _output = new AsyncLocal(); + // Limit the number of concurrent browser tests. + private readonly static int MaxConcurrentBrowsers = Environment.ProcessorCount * 2; + private static readonly SemaphoreSlim _semaphore = new SemaphoreSlim(MaxConcurrentBrowsers); + private bool _semaphoreHeld; + public BrowserTestBase(BrowserFixture browserFixture, ITestOutputHelper output) { BrowserFixture = browserFixture; @@ -39,6 +44,11 @@ namespace Microsoft.AspNetCore.E2ETesting public Task DisposeAsync() { + if (_semaphoreHeld) + { + _semaphore.Release(); + } + return Task.CompletedTask; } @@ -49,6 +59,9 @@ namespace Microsoft.AspNetCore.E2ETesting public virtual async Task InitializeAsync(string isolationContext) { + await _semaphore.WaitAsync(TimeSpan.FromMinutes(30)); + _semaphoreHeld = true; + var (browser, logs) = await BrowserFixture.GetOrCreateBrowserAsync(Output, isolationContext); _asyncBrowser.Value = browser; _logs.Value = logs; From 89bf58445fb1dcc0275c605c0e83abf82a9b9492 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Sat, 10 Aug 2019 18:13:16 -0700 Subject: [PATCH 07/24] Use a ConcurrentDictionary This is used from a bunch of static methods. Dictionary isn't thread safe. Encountered this while debugging some other things. --- .../BasicTestApp/InteropTest/JavaScriptInterop.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Components/test/testassets/BasicTestApp/InteropTest/JavaScriptInterop.cs b/src/Components/test/testassets/BasicTestApp/InteropTest/JavaScriptInterop.cs index a0f35c8040..f8b8c154e7 100644 --- a/src/Components/test/testassets/BasicTestApp/InteropTest/JavaScriptInterop.cs +++ b/src/Components/test/testassets/BasicTestApp/InteropTest/JavaScriptInterop.cs @@ -1,17 +1,17 @@ // 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.JSInterop; using System; +using System.Collections.Concurrent; using System.Collections.Generic; -using System.Text.Json; using System.Threading.Tasks; +using Microsoft.JSInterop; namespace BasicTestApp.InteropTest { public class JavaScriptInterop { - public static IDictionary Invocations = new Dictionary(); + public static ConcurrentDictionary Invocations = new ConcurrentDictionary(); [JSInvokable] public static void ThrowException() => throw new InvalidOperationException("Threw an exception!"); From ab006e10b0e1271fc5e78a031dc880b11fe64edf Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Sat, 10 Aug 2019 19:35:13 -0700 Subject: [PATCH 08/24] Harden ArrayBuilder Since we're using the ArrayPool, it's really essential that we prevent use-after-free bugs. I'm currently tracking one down. --- .../test/Rendering/ArrayBuilderTest.cs | 17 +++++++++++++++++ src/Components/Shared/src/ArrayBuilder.cs | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/src/Components/Components/test/Rendering/ArrayBuilderTest.cs b/src/Components/Components/test/Rendering/ArrayBuilderTest.cs index 6213b6fdd3..d1aae06064 100644 --- a/src/Components/Components/test/Rendering/ArrayBuilderTest.cs +++ b/src/Components/Components/test/Rendering/ArrayBuilderTest.cs @@ -1,6 +1,7 @@ // 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 System; using System.Buffers; using System.Linq; using Xunit; @@ -261,6 +262,7 @@ namespace Microsoft.AspNetCore.Components.RenderTree Assert.Single(ArrayPool.ReturnedBuffers); var returnedBuffer = Assert.Single(ArrayPool.ReturnedBuffers); Assert.Same(buffer, returnedBuffer); + Assert.NotSame(builder.Buffer, buffer); // Prevents use after free } [Fact] @@ -281,6 +283,21 @@ namespace Microsoft.AspNetCore.Components.RenderTree Assert.Same(buffer, returnedBuffer); } + [Fact] + public void Dispose_ThrowsOnReuse() + { + // Arrange + var builder = CreateArrayBuilder(); + builder.Append(1); + var buffer = builder.Buffer; + + builder.Dispose(); + Assert.Single(ArrayPool.ReturnedBuffers); + + // Act & Assert + Assert.Throws(() => builder.Append(1)); + } + [Fact] public void UnusedBufferIsReturned_OnResize() { diff --git a/src/Components/Shared/src/ArrayBuilder.cs b/src/Components/Shared/src/ArrayBuilder.cs index b0f203fdcc..2d751ffc0f 100644 --- a/src/Components/Shared/src/ArrayBuilder.cs +++ b/src/Components/Shared/src/ArrayBuilder.cs @@ -160,6 +160,16 @@ namespace Microsoft.AspNetCore.Components.RenderTree private void GrowBuffer(int desiredCapacity) { + // When we dispose, we set the count back to zero and return the array. + // + // If someone tries to do something that would require non-zero storage then + // this is a use-after-free. Throwing here is an easy way to prevent that without + // introducing overhead to every method. + if (_disposed) + { + ThrowObjectDisposedException(); + } + var newCapacity = Math.Max(desiredCapacity, _minCapacity); Debug.Assert(newCapacity > _items.Length); @@ -188,6 +198,8 @@ namespace Microsoft.AspNetCore.Components.RenderTree { _disposed = true; ReturnBuffer(); + _items = Empty; + _itemsInUse = 0; } } @@ -195,5 +207,10 @@ namespace Microsoft.AspNetCore.Components.RenderTree { throw new ArgumentOutOfRangeException("index"); } + + private static void ThrowObjectDisposedException() + { + throw new ObjectDisposedException(objectName: null); + } } } From 5d4c4d648f22148a8b47527b590e5edcbee3fa0f Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Sat, 10 Aug 2019 19:35:59 -0700 Subject: [PATCH 09/24] Make WaitAssert report browser errors It turns out we frequently have errors in the browser console in cases where we're hitting a "timeout". --- .../BrowserAssertFailedException.cs | 27 +++++++++ src/Shared/E2ETesting/BrowserTestBase.cs | 5 +- src/Shared/E2ETesting/WaitAssert.cs | 7 ++- src/Shared/E2ETesting/WebDriverExtensions.cs | 58 +++++++++++++++++++ 4 files changed, 93 insertions(+), 4 deletions(-) create mode 100644 src/Shared/E2ETesting/BrowserAssertFailedException.cs create mode 100644 src/Shared/E2ETesting/WebDriverExtensions.cs diff --git a/src/Shared/E2ETesting/BrowserAssertFailedException.cs b/src/Shared/E2ETesting/BrowserAssertFailedException.cs new file mode 100644 index 0000000000..579be07d47 --- /dev/null +++ b/src/Shared/E2ETesting/BrowserAssertFailedException.cs @@ -0,0 +1,27 @@ +// 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 System; +using System.Collections.Generic; +using Xunit.Sdk; + +namespace OpenQA.Selenium +{ + // Used to report errors when we find errors in the browser. This is useful + // because the underlying assert probably doesn't provide good information in that + // case. + public class BrowserAssertFailedException : XunitException + { + public BrowserAssertFailedException(IReadOnlyList logs, Exception innerException) + : base(BuildMessage(logs), innerException) + { + } + + private static string BuildMessage(IReadOnlyList logs) + { + return + "Encountered browser errors while running assertion." + Environment.NewLine + + string.Join(Environment.NewLine, logs); + } + } +} diff --git a/src/Shared/E2ETesting/BrowserTestBase.cs b/src/Shared/E2ETesting/BrowserTestBase.cs index 8e94a4bfb2..325509bdb9 100644 --- a/src/Shared/E2ETesting/BrowserTestBase.cs +++ b/src/Shared/E2ETesting/BrowserTestBase.cs @@ -80,15 +80,14 @@ namespace Microsoft.AspNetCore.E2ETesting protected IWebElement WaitUntilExists(By findBy, int timeoutSeconds = 10, bool throwOnError = false) { - List errors = null; + IReadOnlyList errors = null; IWebElement result = null; new WebDriverWait(Browser, TimeSpan.FromSeconds(timeoutSeconds)).Until(driver => { if (throwOnError && Browser.Manage().Logs.AvailableLogTypes.Contains(LogType.Browser)) { // Fail-fast if any errors were logged to the console. - var log = Browser.Manage().Logs.GetLog(LogType.Browser); - errors = log.Where(IsError).ToList(); + errors = Browser.GetBrowserLogs(LogLevel.Severe); if (errors.Count > 0) { return true; diff --git a/src/Shared/E2ETesting/WaitAssert.cs b/src/Shared/E2ETesting/WaitAssert.cs index 42b9934b37..1dc707012b 100644 --- a/src/Shared/E2ETesting/WaitAssert.cs +++ b/src/Shared/E2ETesting/WaitAssert.cs @@ -73,7 +73,12 @@ namespace Microsoft.AspNetCore.E2ETesting } catch (WebDriverTimeoutException) { - if (lastException != null) + var errors = driver.GetBrowserLogs(LogLevel.Severe); + if (errors.Count > 0) + { + throw new BrowserAssertFailedException(errors, lastException); + } + else if (lastException != null) { ExceptionDispatchInfo.Capture(lastException).Throw(); } diff --git a/src/Shared/E2ETesting/WebDriverExtensions.cs b/src/Shared/E2ETesting/WebDriverExtensions.cs new file mode 100644 index 0000000000..04383296bf --- /dev/null +++ b/src/Shared/E2ETesting/WebDriverExtensions.cs @@ -0,0 +1,58 @@ +// 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 System; +using System.Collections.Generic; +using System.Linq; + +namespace OpenQA.Selenium +{ + public static class WebDriverExtensions + { + public static IReadOnlyList GetBrowserLogs(this IWebDriver driver, LogLevel level) + { + if (driver is null) + { + throw new ArgumentNullException(nameof(driver)); + } + + // Fail-fast if any errors were logged to the console. + var log = driver.Manage().Logs.GetLog(LogType.Browser); + if (log == null) + { + return Array.Empty(); + } + + var logs = log.Where(entry => entry.Level >= level && !ShouldIgnore(entry)).ToList(); + if (logs.Count > 0) + { + return logs; + } + + return Array.Empty(); + } + + // Be careful adding anything new to this list. We only want to put things here that are ignorable + // in all cases. + private static bool ShouldIgnore(LogEntry entry) + { + // Don't fail if we're missing the favicon, that's not super important. + if (entry.Message.Contains("favicon.ico")) + { + return true; + } + + // These two messages appear sometimes, but it doesn't actually block the tests. + if (entry.Message.Contains("WASM: wasm streaming compile failed: TypeError: Could not download wasm module")) + { + return true; + } + if (entry.Message.Contains("WASM: falling back to ArrayBuffer instantiation")) + { + return true; + } + + return false; + } + } +} From 7b7c13c0d5b215bf1bc0dcd78b640783b7ffe5e2 Mon Sep 17 00:00:00 2001 From: Brennan Date: Sun, 11 Aug 2019 20:23:18 -0700 Subject: [PATCH 10/24] Try to make test more reliable (#12989) --- .../ts/signalr/tests/HubConnection.test.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/SignalR/clients/ts/signalr/tests/HubConnection.test.ts b/src/SignalR/clients/ts/signalr/tests/HubConnection.test.ts index 72c417d343..2335e413e9 100644 --- a/src/SignalR/clients/ts/signalr/tests/HubConnection.test.ts +++ b/src/SignalR/clients/ts/signalr/tests/HubConnection.test.ts @@ -1273,18 +1273,22 @@ describe("HubConnection", () => { const connection = new TestConnection(); const hubConnection = createHubConnection(connection, logger); try { - hubConnection.serverTimeoutInMilliseconds = 400; + const timeoutInMilliseconds = 400; + hubConnection.serverTimeoutInMilliseconds = timeoutInMilliseconds; const p = new PromiseSource(); hubConnection.onclose((e) => p.resolve(e)); await hubConnection.start(); - for (let i = 0; i < 12; i++) { - await pingAndWait(connection); - } + const pingInterval = setInterval(async () => { + await connection.receive({ type: MessageType.Ping }); + }, 10); + + await delayUntil(timeoutInMilliseconds * 2); await connection.stop(); + clearInterval(pingInterval); const error = await p.promise; @@ -1318,11 +1322,6 @@ describe("HubConnection", () => { }); }); -async function pingAndWait(connection: TestConnection): Promise { - await connection.receive({ type: MessageType.Ping }); - await delayUntil(50); -} - class TestProtocol implements IHubProtocol { public readonly name: string = "TestProtocol"; public readonly version: number = 1; From 502fe76e63e8d6755abd3c7df6361a0f2ec4444e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2019 06:50:38 +0000 Subject: [PATCH 11/24] [release/3.0] Update dependencies from 2 repositories (#12935) * Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190806.3 - Microsoft.NET.Sdk.Razor - 3.0.0-preview9.19406.3 - Microsoft.CodeAnalysis.Razor - 3.0.0-preview9.19406.3 - Microsoft.AspNetCore.Razor.Language - 3.0.0-preview9.19406.3 - Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview9.19406.3 * Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190806.10 - Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview9.19406.10 - Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview9.19406.10 - dotnet-ef - 3.0.0-preview9.19406.10 - Microsoft.EntityFrameworkCore - 3.0.0-preview9.19406.10 - Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview9.19406.10 - Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview9.19406.10 - Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview9.19406.10 * Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190806.5 - Microsoft.NET.Sdk.Razor - 3.0.0-preview9.19406.5 - Microsoft.CodeAnalysis.Razor - 3.0.0-preview9.19406.5 - Microsoft.AspNetCore.Razor.Language - 3.0.0-preview9.19406.5 - Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview9.19406.5 * Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190807.1 - Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview9.19407.1 - Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview9.19407.1 - dotnet-ef - 3.0.0-preview9.19407.1 - Microsoft.EntityFrameworkCore - 3.0.0-preview9.19407.1 - Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview9.19407.1 - Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview9.19407.1 - Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview9.19407.1 Dependency coherency updates - Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Memory - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Binder - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Ini - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Json - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Xml - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Http - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Configuration - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Console - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Debug - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventSource - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventLog - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Testing - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ObjectPool - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Primitives - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.WebEncoders - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Internal.Extensions.Refs - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.JSInterop - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Mono.WebAssembly.Interop - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Internal.AspNetCore.Analyzers - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.Testing - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Net.Compilers.Toolset - 3.3.0-beta3-19406-05 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190807.2 - Microsoft.NET.Sdk.Razor - 3.0.0-preview9.19407.2 - Microsoft.CodeAnalysis.Razor - 3.0.0-preview9.19407.2 - Microsoft.AspNetCore.Razor.Language - 3.0.0-preview9.19407.2 - Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview9.19407.2 * Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190807.5 - Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview9.19407.5 - Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview9.19407.5 - dotnet-ef - 3.0.0-preview9.19407.5 - Microsoft.EntityFrameworkCore - 3.0.0-preview9.19407.5 - Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview9.19407.5 - Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview9.19407.5 - Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview9.19407.5 Dependency coherency updates - Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Memory - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Binder - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Ini - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Json - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Xml - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Http - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Configuration - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Console - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Debug - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventSource - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventLog - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Testing - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ObjectPool - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Primitives - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.WebEncoders - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Internal.Extensions.Refs - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.JSInterop - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Mono.WebAssembly.Interop - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Internal.AspNetCore.Analyzers - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.Testing - 3.0.0-preview9.19406.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Net.Compilers.Toolset - 3.3.0-beta3-19406-05 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190807.3 - Microsoft.NET.Sdk.Razor - 3.0.0-preview9.19407.3 - Microsoft.CodeAnalysis.Razor - 3.0.0-preview9.19407.3 - Microsoft.AspNetCore.Razor.Language - 3.0.0-preview9.19407.3 - Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview9.19407.3 * Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190807.7 - Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview9.19407.7 - Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview9.19407.7 - dotnet-ef - 3.0.0-preview9.19407.7 - Microsoft.EntityFrameworkCore - 3.0.0-preview9.19407.7 - Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview9.19407.7 - Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview9.19407.7 - Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview9.19407.7 Dependency coherency updates - Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Memory - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Binder - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Ini - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Json - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Xml - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Http - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Configuration - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Console - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Debug - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventSource - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventLog - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Testing - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ObjectPool - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Primitives - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.WebEncoders - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Internal.Extensions.Refs - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.JSInterop - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Mono.WebAssembly.Interop - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Internal.AspNetCore.Analyzers - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.Testing - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Net.Compilers.Toolset - 3.3.0-beta3-19407-05 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190808.12 - Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview9.19408.12 - Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview9.19408.12 - dotnet-ef - 3.0.0-preview9.19408.12 - Microsoft.EntityFrameworkCore - 3.0.0-preview9.19408.12 - Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview9.19408.12 - Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview9.19408.12 - Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview9.19408.12 Dependency coherency updates - Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Memory - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Binder - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Ini - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Json - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Xml - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Http - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Configuration - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Console - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Debug - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventSource - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventLog - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Testing - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ObjectPool - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Primitives - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.WebEncoders - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Internal.Extensions.Refs - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.JSInterop - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Mono.WebAssembly.Interop - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Internal.AspNetCore.Analyzers - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.Testing - 3.0.0-preview9.19407.5 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Net.Compilers.Toolset - 3.3.0-beta3-19407-05 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190808.18 - Microsoft.NET.Sdk.Razor - 3.0.0-preview9.19408.18 - Microsoft.CodeAnalysis.Razor - 3.0.0-preview9.19408.18 - Microsoft.AspNetCore.Razor.Language - 3.0.0-preview9.19408.18 - Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview9.19408.18 * Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190808.17 - Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview9.19408.17 - Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview9.19408.17 - dotnet-ef - 3.0.0-preview9.19408.17 - Microsoft.EntityFrameworkCore - 3.0.0-preview9.19408.17 - Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview9.19408.17 - Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview9.19408.17 - Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview9.19408.17 Dependency coherency updates - Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Memory - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Binder - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Ini - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Json - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Xml - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Http - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Configuration - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Console - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Debug - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventSource - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventLog - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Testing - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ObjectPool - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Primitives - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.WebEncoders - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Internal.Extensions.Refs - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.JSInterop - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Mono.WebAssembly.Interop - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.Logging - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.CSharp - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Win32.Registry - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Win32.SystemEvents - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ComponentModel.Annotations - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.EventLog - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Drawing.Common - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.IO.Pipelines - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Net.Http.WinHttpHandler - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Net.WebSockets.WebSocketProtocol - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Reflection.Metadata - 1.7.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Runtime.CompilerServices.Unsafe - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Cng - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Pkcs - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Xml - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Permissions - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Principal.Windows - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ServiceProcess.ServiceController - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Encodings.Web - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Json - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Threading.Channels - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Windows.Extensions - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Extensions.DependencyModel - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Ref - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - NETStandard.Library.Ref - 2.1.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.Platforms - 3.0.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Internal.AspNetCore.Analyzers - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.Testing - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Net.Compilers.Toolset - 3.3.0-beta2-19407-12 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190809.2 - Microsoft.NET.Sdk.Razor - 3.0.0-preview9.19409.2 - Microsoft.CodeAnalysis.Razor - 3.0.0-preview9.19409.2 - Microsoft.AspNetCore.Razor.Language - 3.0.0-preview9.19409.2 - Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview9.19409.2 * Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190809.12 - Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview9.19409.12 - Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview9.19409.12 - dotnet-ef - 3.0.0-preview9.19409.12 - Microsoft.EntityFrameworkCore - 3.0.0-preview9.19409.12 - Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview9.19409.12 - Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview9.19409.12 - Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview9.19409.12 Dependency coherency updates - Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Memory - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Binder - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Ini - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Json - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Xml - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Http - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Configuration - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Console - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Debug - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventSource - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventLog - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Testing - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ObjectPool - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Primitives - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.WebEncoders - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Internal.Extensions.Refs - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.JSInterop - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Mono.WebAssembly.Interop - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.Logging - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.CSharp - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Win32.Registry - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Win32.SystemEvents - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ComponentModel.Annotations - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.EventLog - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Drawing.Common - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.IO.Pipelines - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Net.Http.WinHttpHandler - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Net.WebSockets.WebSocketProtocol - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Reflection.Metadata - 1.7.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Runtime.CompilerServices.Unsafe - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Cng - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Pkcs - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Xml - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Permissions - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Principal.Windows - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ServiceProcess.ServiceController - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Encodings.Web - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Json - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Threading.Channels - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Windows.Extensions - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Extensions.DependencyModel - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Ref - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - NETStandard.Library.Ref - 2.1.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.Platforms - 3.0.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Internal.AspNetCore.Analyzers - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.Testing - 3.0.0-preview9.19408.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Net.Compilers.Toolset - 3.3.0-beta2-19407-12 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190809.4 - Microsoft.NET.Sdk.Razor - 3.0.0-preview9.19409.4 - Microsoft.CodeAnalysis.Razor - 3.0.0-preview9.19409.4 - Microsoft.AspNetCore.Razor.Language - 3.0.0-preview9.19409.4 - Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview9.19409.4 * Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190809.15 - Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview9.19409.15 - Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview9.19409.15 - dotnet-ef - 3.0.0-preview9.19409.15 - Microsoft.EntityFrameworkCore - 3.0.0-preview9.19409.15 - Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview9.19409.15 - Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview9.19409.15 - Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview9.19409.15 Dependency coherency updates - Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Memory - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Binder - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Ini - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Json - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Xml - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Http - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Configuration - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Console - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Debug - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventSource - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventLog - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Testing - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ObjectPool - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Primitives - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.WebEncoders - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Internal.Extensions.Refs - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.JSInterop - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Mono.WebAssembly.Interop - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.Logging - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.CSharp - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Win32.Registry - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Win32.SystemEvents - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ComponentModel.Annotations - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.EventLog - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Drawing.Common - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.IO.Pipelines - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Net.Http.WinHttpHandler - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Net.WebSockets.WebSocketProtocol - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Reflection.Metadata - 1.7.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Runtime.CompilerServices.Unsafe - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Cng - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Pkcs - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Xml - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Permissions - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Principal.Windows - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ServiceProcess.ServiceController - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Encodings.Web - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Json - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Threading.Channels - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Windows.Extensions - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Extensions.DependencyModel - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Ref - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - NETStandard.Library.Ref - 2.1.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.Platforms - 3.0.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Internal.AspNetCore.Analyzers - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.Testing - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Net.Compilers.Toolset - 3.3.0-beta2-19407-12 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190810.1 - Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview9.19410.1 - Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview9.19410.1 - dotnet-ef - 3.0.0-preview9.19410.1 - Microsoft.EntityFrameworkCore - 3.0.0-preview9.19410.1 - Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview9.19410.1 - Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview9.19410.1 - Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview9.19410.1 Dependency coherency updates - Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Memory - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Binder - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Ini - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Json - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Xml - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Http - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Configuration - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Console - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Debug - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventSource - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventLog - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Testing - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ObjectPool - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Primitives - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.WebEncoders - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Internal.Extensions.Refs - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.JSInterop - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Mono.WebAssembly.Interop - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.Logging - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.CSharp - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Win32.Registry - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Win32.SystemEvents - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ComponentModel.Annotations - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.EventLog - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Drawing.Common - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.IO.Pipelines - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Net.Http.WinHttpHandler - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Net.WebSockets.WebSocketProtocol - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Reflection.Metadata - 1.7.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Runtime.CompilerServices.Unsafe - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Cng - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Pkcs - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Xml - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Permissions - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Principal.Windows - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ServiceProcess.ServiceController - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Encodings.Web - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Json - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Threading.Channels - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Windows.Extensions - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Extensions.DependencyModel - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Ref - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - NETStandard.Library.Ref - 2.1.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.Platforms - 3.0.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Internal.AspNetCore.Analyzers - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.Testing - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Net.Compilers.Toolset - 3.3.0-beta2-19407-12 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190810.3 - Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview9.19410.3 - Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview9.19410.3 - dotnet-ef - 3.0.0-preview9.19410.3 - Microsoft.EntityFrameworkCore - 3.0.0-preview9.19410.3 - Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview9.19410.3 - Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview9.19410.3 - Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview9.19410.3 Dependency coherency updates - Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Memory - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Binder - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Ini - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Json - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Xml - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Http - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Configuration - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Console - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Debug - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventSource - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventLog - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Testing - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ObjectPool - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Primitives - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.WebEncoders - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Internal.Extensions.Refs - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.JSInterop - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Mono.WebAssembly.Interop - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.Logging - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.CSharp - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Win32.Registry - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Win32.SystemEvents - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ComponentModel.Annotations - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.EventLog - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Drawing.Common - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.IO.Pipelines - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Net.Http.WinHttpHandler - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Net.WebSockets.WebSocketProtocol - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Reflection.Metadata - 1.7.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Runtime.CompilerServices.Unsafe - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Cng - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Pkcs - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Xml - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Permissions - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Principal.Windows - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ServiceProcess.ServiceController - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Encodings.Web - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Json - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Threading.Channels - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Windows.Extensions - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Extensions.DependencyModel - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Ref - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - NETStandard.Library.Ref - 2.1.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.Platforms - 3.0.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Internal.AspNetCore.Analyzers - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.Testing - 3.0.0-preview9.19409.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Net.Compilers.Toolset - 3.3.0-beta2-19407-12 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190811.3 - Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview9.19411.3 - Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview9.19411.3 - dotnet-ef - 3.0.0-preview9.19411.3 - Microsoft.EntityFrameworkCore - 3.0.0-preview9.19411.3 - Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview9.19411.3 - Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview9.19411.3 - Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview9.19411.3 Dependency coherency updates - Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Memory - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Binder - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Ini - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Json - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Xml - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Http - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Configuration - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Console - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Debug - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventSource - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventLog - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Testing - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ObjectPool - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Primitives - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.WebEncoders - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Internal.Extensions.Refs - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.JSInterop - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Mono.WebAssembly.Interop - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.Logging - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.CSharp - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Win32.Registry - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Win32.SystemEvents - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ComponentModel.Annotations - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.EventLog - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Drawing.Common - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.IO.Pipelines - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Net.Http.WinHttpHandler - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Net.WebSockets.WebSocketProtocol - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Reflection.Metadata - 1.7.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Runtime.CompilerServices.Unsafe - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Cng - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Pkcs - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Xml - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Permissions - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Principal.Windows - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ServiceProcess.ServiceController - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Encodings.Web - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Json - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Threading.Channels - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Windows.Extensions - 4.6.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Extensions.DependencyModel - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Ref - 3.0.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - NETStandard.Library.Ref - 2.1.0-preview9-19407-10 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.Platforms - 3.0.0-preview9.19407.4 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Internal.AspNetCore.Analyzers - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.Testing - 3.0.0-preview9.19411.1 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Net.Compilers.Toolset - 3.3.0-beta2-19407-12 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190811.1 - Microsoft.NET.Sdk.Razor - 3.0.0-preview9.19411.1 - Microsoft.CodeAnalysis.Razor - 3.0.0-preview9.19411.1 - Microsoft.AspNetCore.Razor.Language - 3.0.0-preview9.19411.1 - Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview9.19411.1 --- eng/Version.Details.xml | 400 ++++++++++++++++++++-------------------- eng/Versions.props | 200 ++++++++++---------- 2 files changed, 300 insertions(+), 300 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 61b046dda3..27b3655375 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,408 +13,408 @@ https://github.com/aspnet/Blazor 498a843f7854f9a2a5820e55cd2c7d7654429682 - + https://github.com/aspnet/AspNetCore-Tooling - e8513f081db002887e50a27438d08d6cb451a50c + 80619654bb1b9b8c2b57f36ce7b707e540d7d2e2 - + https://github.com/aspnet/AspNetCore-Tooling - e8513f081db002887e50a27438d08d6cb451a50c + 80619654bb1b9b8c2b57f36ce7b707e540d7d2e2 - + https://github.com/aspnet/AspNetCore-Tooling - e8513f081db002887e50a27438d08d6cb451a50c + 80619654bb1b9b8c2b57f36ce7b707e540d7d2e2 - + https://github.com/aspnet/AspNetCore-Tooling - e8513f081db002887e50a27438d08d6cb451a50c + 80619654bb1b9b8c2b57f36ce7b707e540d7d2e2 - + https://github.com/aspnet/EntityFrameworkCore - 07ed34e80585ca9575ea0265921d42a203193b21 + b5ed92f43b87dd7b9c5452bc87e0c849d08efdf8 - + https://github.com/aspnet/EntityFrameworkCore - 07ed34e80585ca9575ea0265921d42a203193b21 + b5ed92f43b87dd7b9c5452bc87e0c849d08efdf8 - + https://github.com/aspnet/EntityFrameworkCore - 07ed34e80585ca9575ea0265921d42a203193b21 + b5ed92f43b87dd7b9c5452bc87e0c849d08efdf8 - + https://github.com/aspnet/EntityFrameworkCore - 07ed34e80585ca9575ea0265921d42a203193b21 + b5ed92f43b87dd7b9c5452bc87e0c849d08efdf8 - + https://github.com/aspnet/EntityFrameworkCore - 07ed34e80585ca9575ea0265921d42a203193b21 + b5ed92f43b87dd7b9c5452bc87e0c849d08efdf8 - + https://github.com/aspnet/EntityFrameworkCore - 07ed34e80585ca9575ea0265921d42a203193b21 + b5ed92f43b87dd7b9c5452bc87e0c849d08efdf8 - + https://github.com/aspnet/EntityFrameworkCore - 07ed34e80585ca9575ea0265921d42a203193b21 + b5ed92f43b87dd7b9c5452bc87e0c849d08efdf8 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 https://github.com/dotnet/corefx a28176b5ec68b6da1472934fe9493790d1665cae - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/dotnet/core-setup - d15a0adeb874801e7bfaa4fbbb306a2efa268497 + 88e391bb71d5659c28fdb23434752cab6878cc06 - + https://github.com/dotnet/core-setup - d15a0adeb874801e7bfaa4fbbb306a2efa268497 + 88e391bb71d5659c28fdb23434752cab6878cc06 - + https://github.com/dotnet/core-setup - d15a0adeb874801e7bfaa4fbbb306a2efa268497 + 88e391bb71d5659c28fdb23434752cab6878cc06 - + https://github.com/dotnet/core-setup - d15a0adeb874801e7bfaa4fbbb306a2efa268497 + 88e391bb71d5659c28fdb23434752cab6878cc06 - + https://github.com/dotnet/corefx - 80f411d58df8338ccd9430900b541a037a9cb383 + f7948ea046c74fda9776d7150ea5770c2cd94845 - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 https://github.com/dotnet/arcade @@ -428,13 +428,13 @@ https://github.com/dotnet/arcade b1c2f33f0cef32d1df6e7f388017fd6761d3fcad - + https://github.com/aspnet/Extensions - 86469ee35cf718e0122f16f52b486303dcfbb1fe + 77403f35be5559b01c7d10074f3670e636c49811 - + https://github.com/dotnet/roslyn - e9b4c66fb2f26bca02d4a718c48c1c39e9963c9f + a06bcb44c6bc374d1af6b2a0b3eb9e7f0fed1913 diff --git a/eng/Versions.props b/eng/Versions.props index ad1b617ed3..a30224ee0d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -52,115 +52,115 @@ 1.0.0-beta.19404.1 - 3.3.0-beta3-19401-01 + 3.3.0-beta2-19407-12 - 3.0.0-preview8-28379-05 - 3.0.0-preview8-28379-05 - 3.0.0-preview8-28379-05 - 2.1.0-preview8-28379-05 + 3.0.0-preview9-19407-10 + 3.0.0-preview9-19407-10 + 3.0.0-preview9-19407-10 + 2.1.0-preview9-19407-10 - 1.0.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 + 1.0.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 4.7.0-preview6.19264.9 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 1.7.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 - 4.6.0-preview8.19378.8 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 1.7.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 + 4.6.0-preview9.19407.4 - 3.0.0-preview8.19378.8 + 3.0.0-preview9.19407.4 3.0.0-preview9.19405.1 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 - 3.0.0-preview9.19405.2 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 - 3.0.0-preview9.19405.13 - 3.0.0-preview9.19405.13 - 3.0.0-preview9.19405.13 - 3.0.0-preview9.19405.13 - 3.0.0-preview9.19405.13 - 3.0.0-preview9.19405.13 - 3.0.0-preview9.19405.13 + 3.0.0-preview9.19411.3 + 3.0.0-preview9.19411.3 + 3.0.0-preview9.19411.3 + 3.0.0-preview9.19411.3 + 3.0.0-preview9.19411.3 + 3.0.0-preview9.19411.3 + 3.0.0-preview9.19411.3 - 3.0.0-preview9.19405.6 - 3.0.0-preview9.19405.6 - 3.0.0-preview9.19405.6 - 3.0.0-preview9.19405.6 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.1 - 1.0.0-beta.19404.1 + 1.0.0-beta.19411.1 3.3.0-beta2-19407-12 diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml index f657a4dc91..91621cf88f 100644 --- a/eng/common/templates/job/execute-sdl.yml +++ b/eng/common/templates/job/execute-sdl.yml @@ -10,6 +10,8 @@ jobs: displayName: Run SDL tool variables: - group: DotNet-VSTS-Bot + pool: + name: Hosted VS2017 steps: - checkout: self clean: true diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 33db50ce26..aba0b0fcaf 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -52,6 +52,7 @@ stages: filePath: eng\common\sdk-task.ps1 arguments: -task SigningValidation -restore -msbuildEngine dotnet /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' + /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt' /p:Configuration=Release - ${{ if eq(parameters.enableSourceLinkValidation, 'true') }}: diff --git a/global.json b/global.json index 64afa6336e..2d26e775e7 100644 --- a/global.json +++ b/global.json @@ -24,7 +24,7 @@ }, "msbuild-sdks": { "Yarn.MSBuild": "1.15.2", - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19404.1", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19404.1" + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19411.1", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19411.1" } } From c6f043cb981cb772d062383e0071920b6eec1c9a Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Mon, 12 Aug 2019 17:10:30 +0100 Subject: [PATCH 13/24] Update Mono debug proxy code (#13053) This is now equivalent to Mono's commit 612e064 and to the Mono binaries that we'll include in Preview 9 --- .../src/MonoDebugProxy/ws-proxy/MonoProxy.cs | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs index d72c540f11..348b69c691 100644 --- a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs +++ b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs @@ -322,8 +322,7 @@ namespace WsProxy { name = method.Name, startLocation = method.StartLocation.ToJObject (), endLocation = method.EndLocation.ToJObject (), - }}, - @this = new { } + }} })); ++frame_id; @@ -485,11 +484,11 @@ namespace WsProxy { var values = res.Value? ["result"]? ["value"]?.Values ().ToArray (); var var_list = new List (); - + int i = 0; // Trying to inspect the stack frame for DotNetDispatcher::InvokeSynchronously // results in a "Memory access out of bounds", causing 'values' to be null, // so skip returning variable values in that case. - for (int i = 0; values != null && i < vars.Length; ++i) { + while (values != null && i < var_ids.Length && i < values.Length) { var value = values [i] ["value"]; if (((string)value ["description"]) == null) value ["description"] = value ["value"]?.ToString(); @@ -498,12 +497,24 @@ namespace WsProxy { name = vars [i].Name, value = values [i] ["value"] })); + i++; + } + //Async methods are special in the way that local variables can be lifted to generated class fields + //value of "this" comes here either + while (i < values.Length) { + String name = values [i] ["name"].ToString (); + if (name.IndexOf (">", StringComparison.Ordinal) > 0) + name = name.Substring (1, name.IndexOf (">", StringComparison.Ordinal) - 1); + var_list.Add (JObject.FromObject (new { + name = name, + value = values [i+1] ["value"] + })); + i = i + 2; } o = JObject.FromObject (new { result = var_list }); - SendResponse (msg_id, Result.Ok (o), token); } From b9584d56d8b7eac2f257f1c9bf3a424c6dc0456d Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Sat, 10 Aug 2019 22:33:38 -0700 Subject: [PATCH 14/24] Make `$(HelixTestName)` more routing-friendly - work around dotnet/arcade#3602 - this property is part of URLs e.g. https://helix.dot.net/api/{Date}/jobs/{GUID}/workitems/{HelixTestName}/console --- eng/targets/Helix.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/targets/Helix.props b/eng/targets/Helix.props index 0c0357ecdf..30a5903b9a 100644 --- a/eng/targets/Helix.props +++ b/eng/targets/Helix.props @@ -14,7 +14,7 @@ 00:30:00 false true - $(MSBuildProjectName)/$(TargetFramework) + $(MSBuildProjectName)-$(TargetFramework) false true 10.15.3 @@ -39,7 +39,7 @@ - + From a4ab9ffa05c3f7f34cba4b8005a4abe139073582 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Tue, 13 Aug 2019 00:36:27 +0100 Subject: [PATCH 15/24] Factor out auth and forms. Fixes #12950 (#12999) * Add empty Authorization src and test projects * Add references * Move auth types into .Authorization project * Move auth tests * Fix Mvc.ViewFeatures * Remove the reference from .Web to .Authorization, so it's truly optional * Add empty Forms src and test projects * Remove dependencies from Components.csproj * Move forms sources and tests * Reference .Forms from .Web (needed unless we also have .Forms.Web) * Rebase on #12936 * Update reference assemblies * CR: Add Authorization namespace * Update ref sources * Add missing using * Add another missing using --- eng/ProjectReferences.props | 2 + eng/SharedFramework.Local.props | 2 + ...AspNetCore.Components.Authorization.csproj | 16 +++ ....Components.Authorization.netcoreapp3.0.cs | 68 +++++++++ ...Components.Authorization.netstandard2.0.cs | 68 +++++++++ .../src}/AttributeAuthorizeDataCache.cs | 3 +- .../src}/AuthenticationState.cs | 2 +- .../src}/AuthenticationStateProvider.cs | 2 +- .../src}/AuthorizeDataAdapter.cs | 2 +- .../src}/AuthorizeRouteView.cs | 3 +- .../src}/AuthorizeView.cs | 2 +- .../src}/AuthorizeViewCore.cs | 2 +- .../src}/CascadingAuthenticationState.razor | 1 - ...tEnvironmentAuthenticationStateProvider.cs | 2 +- ...AspNetCore.Components.Authorization.csproj | 18 +++ .../test}/AuthorizeRouteViewTest.cs | 2 +- .../test}/AuthorizeViewTest.cs | 2 +- .../test}/CascadingAuthenticationStateTest.cs | 2 +- ...Core.Components.Authorization.Tests.csproj | 18 +++ .../test}/TestAuthenticationStateProvider.cs | 4 +- .../test}/TestAuthorizationPolicyProvider.cs | 2 +- .../test}/TestAuthorizationService.cs | 2 +- .../test}/TestIdentity.cs | 2 +- .../ref/Microsoft.AspNetCore.Blazor.csproj | 1 + .../src/Hosting/WebAssemblyHostBuilder.cs | 2 + .../src/Microsoft.AspNetCore.Blazor.csproj | 3 +- src/Components/Components.sln | 64 +++++++++ .../Microsoft.AspNetCore.Components.csproj | 7 +- ...oft.AspNetCore.Components.netcoreapp3.0.cs | 134 ------------------ ...ft.AspNetCore.Components.netstandard2.0.cs | 134 ------------------ .../Microsoft.AspNetCore.Components.csproj | 10 +- .../Components/src/Properties/AssemblyInfo.cs | 6 +- src/Components/ComponentsNoDeps.slnf | 4 + ...crosoft.AspNetCore.Components.Forms.csproj | 15 ++ ...pNetCore.Components.Forms.netcoreapp3.0.cs | 75 ++++++++++ ...NetCore.Components.Forms.netstandard2.0.cs | 75 ++++++++++ .../src}/DataAnnotationsValidator.cs | 0 .../src/Forms => Forms/src}/EditContext.cs | 0 .../EditContextDataAnnotationsExtensions.cs | 0 .../src}/FieldChangedEventArgs.cs | 0 .../Forms => Forms/src}/FieldIdentifier.cs | 0 .../src/Forms => Forms/src}/FieldState.cs | 0 ...crosoft.AspNetCore.Components.Forms.csproj | 20 +++ .../src}/ValidationMessageStore.cs | 0 .../src}/ValidationRequestedEventArgs.cs | 0 .../src}/ValidationStateChangedEventArgs.cs | 0 ...ditContextDataAnnotationsExtensionsTest.cs | 0 .../Forms => Forms/test}/EditContextTest.cs | 0 .../test}/FieldIdentifierTest.cs | 0 ...t.AspNetCore.Components.Forms.Tests.csproj | 17 +++ .../test}/ValidationMessageStoreTest.cs | 0 ...rosoft.AspNetCore.Components.Server.csproj | 1 + ...NetCore.Components.Server.netcoreapp3.0.cs | 8 +- .../Server/src/Circuits/CircuitHost.cs | 1 + ...datingServerAuthenticationStateProvider.cs | 1 + .../ServerAuthenticationStateProvider.cs | 1 + .../ComponentServiceCollectionExtensions.cs | 1 + ...rosoft.AspNetCore.Components.Server.csproj | 3 +- ...datingServerAuthenticationStateProvider.cs | 1 + .../ServerAuthenticationStateProviderTest.cs | 1 + ...Microsoft.AspNetCore.Components.Web.csproj | 2 + ...Microsoft.AspNetCore.Components.Web.csproj | 1 + .../BasicTestApp/AuthTest/AuthRouter.razor | 1 + .../AuthTest/AuthorizeViewCases.razor | 1 + ...CascadingAuthenticationStateConsumer.razor | 1 + .../ServerAuthenticationStateProvider.cs | 1 + .../BasicTestApp/BasicTestApp.csproj | 1 + .../PrerenderedToInteractiveTransition.razor | 1 + .../test/testassets/BasicTestApp/Startup.cs | 1 + ...crosoft.AspNetCore.Mvc.ViewFeatures.csproj | 1 + ...crosoft.AspNetCore.Mvc.ViewFeatures.csproj | 1 + .../StaticComponentRenderer.cs | 1 + ...tingIdentityAuthenticationStateProvider.cs | 1 + .../content/BlazorServerWeb-CSharp/Startup.cs | 1 + .../BlazorServerWeb-CSharp/_Imports.razor | 1 + 75 files changed, 523 insertions(+), 305 deletions(-) create mode 100644 src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.csproj create mode 100644 src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netcoreapp3.0.cs create mode 100644 src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netstandard2.0.cs rename src/Components/{Components/src/Auth => Authorization/src}/AttributeAuthorizeDataCache.cs (95%) rename src/Components/{Components/src/Auth => Authorization/src}/AuthenticationState.cs (94%) rename src/Components/{Components/src/Auth => Authorization/src}/AuthenticationStateProvider.cs (97%) rename src/Components/{Components/src/Auth => Authorization/src}/AuthorizeDataAdapter.cs (95%) rename src/Components/{Components/src/Auth => Authorization/src}/AuthorizeRouteView.cs (98%) rename src/Components/{Components/src/Auth => Authorization/src}/AuthorizeView.cs (95%) rename src/Components/{Components/src/Auth => Authorization/src}/AuthorizeViewCore.cs (99%) rename src/Components/{Components/src/Auth => Authorization/src}/CascadingAuthenticationState.razor (96%) rename src/Components/{Components/src/Auth => Authorization/src}/IHostEnvironmentAuthenticationStateProvider.cs (93%) create mode 100644 src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj rename src/Components/{Components/test/Auth => Authorization/test}/AuthorizeRouteViewTest.cs (99%) rename src/Components/{Components/test/Auth => Authorization/test}/AuthorizeViewTest.cs (99%) rename src/Components/{Components/test/Auth => Authorization/test}/CascadingAuthenticationStateTest.cs (99%) create mode 100644 src/Components/Authorization/test/Microsoft.AspNetCore.Components.Authorization.Tests.csproj rename src/Components/{Components/test/Auth => Authorization/test}/TestAuthenticationStateProvider.cs (84%) rename src/Components/{Components/test/Auth => Authorization/test}/TestAuthorizationPolicyProvider.cs (95%) rename src/Components/{Components/test/Auth => Authorization/test}/TestAuthorizationService.cs (96%) rename src/Components/{Components/test/Auth => Authorization/test}/TestIdentity.cs (87%) create mode 100644 src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.csproj create mode 100644 src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netcoreapp3.0.cs create mode 100644 src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netstandard2.0.cs rename src/Components/{Components/src/Forms => Forms/src}/DataAnnotationsValidator.cs (100%) rename src/Components/{Components/src/Forms => Forms/src}/EditContext.cs (100%) rename src/Components/{Components/src/Forms => Forms/src}/EditContextDataAnnotationsExtensions.cs (100%) rename src/Components/{Components/src/Forms => Forms/src}/FieldChangedEventArgs.cs (100%) rename src/Components/{Components/src/Forms => Forms/src}/FieldIdentifier.cs (100%) rename src/Components/{Components/src/Forms => Forms/src}/FieldState.cs (100%) create mode 100644 src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj rename src/Components/{Components/src/Forms => Forms/src}/ValidationMessageStore.cs (100%) rename src/Components/{Components/src/Forms => Forms/src}/ValidationRequestedEventArgs.cs (100%) rename src/Components/{Components/src/Forms => Forms/src}/ValidationStateChangedEventArgs.cs (100%) rename src/Components/{Components/test/Forms => Forms/test}/EditContextDataAnnotationsExtensionsTest.cs (100%) rename src/Components/{Components/test/Forms => Forms/test}/EditContextTest.cs (100%) rename src/Components/{Components/test/Forms => Forms/test}/FieldIdentifierTest.cs (100%) create mode 100644 src/Components/Forms/test/Microsoft.AspNetCore.Components.Forms.Tests.csproj rename src/Components/{Components/test/Forms => Forms/test}/ValidationMessageStoreTest.cs (100%) diff --git a/eng/ProjectReferences.props b/eng/ProjectReferences.props index 5e50238a4b..1830293e0d 100644 --- a/eng/ProjectReferences.props +++ b/eng/ProjectReferences.props @@ -131,10 +131,12 @@ + + diff --git a/eng/SharedFramework.Local.props b/eng/SharedFramework.Local.props index a52c31e0ad..5f09d593de 100644 --- a/eng/SharedFramework.Local.props +++ b/eng/SharedFramework.Local.props @@ -22,7 +22,9 @@ + + diff --git a/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.csproj b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.csproj new file mode 100644 index 0000000000..d60eb31594 --- /dev/null +++ b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.csproj @@ -0,0 +1,16 @@ + + + + netstandard2.0;netcoreapp3.0 + + + + + + + + + + + + diff --git a/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netcoreapp3.0.cs b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netcoreapp3.0.cs new file mode 100644 index 0000000000..a19e7c1ba3 --- /dev/null +++ b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netcoreapp3.0.cs @@ -0,0 +1,68 @@ +// 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. + +namespace Microsoft.AspNetCore.Components.Authorization +{ + public partial class AuthenticationState + { + public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) { } + public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task task); + public abstract partial class AuthenticationStateProvider + { + protected AuthenticationStateProvider() { } + public event Microsoft.AspNetCore.Components.Authorization.AuthenticationStateChangedHandler AuthenticationStateChanged { add { } remove { } } + public abstract System.Threading.Tasks.Task GetAuthenticationStateAsync(); + protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task task) { } + } + public sealed partial class AuthorizeRouteView : Microsoft.AspNetCore.Components.RouteView + { + public AuthorizeRouteView() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + } + public partial class AuthorizeView : Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore + { + public AuthorizeView() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; } + } + public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase + { + protected AuthorizeViewCore() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData(); + [System.Diagnostics.DebuggerStepThroughAttribute] + protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; } + } + public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public CascadingAuthenticationState() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override void OnInitialized() { } + void System.IDisposable.Dispose() { } + } + public partial interface IHostEnvironmentAuthenticationStateProvider + { + void SetAuthenticationState(System.Threading.Tasks.Task authenticationStateTask); + } +} diff --git a/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netstandard2.0.cs b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netstandard2.0.cs new file mode 100644 index 0000000000..a19e7c1ba3 --- /dev/null +++ b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netstandard2.0.cs @@ -0,0 +1,68 @@ +// 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. + +namespace Microsoft.AspNetCore.Components.Authorization +{ + public partial class AuthenticationState + { + public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) { } + public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task task); + public abstract partial class AuthenticationStateProvider + { + protected AuthenticationStateProvider() { } + public event Microsoft.AspNetCore.Components.Authorization.AuthenticationStateChangedHandler AuthenticationStateChanged { add { } remove { } } + public abstract System.Threading.Tasks.Task GetAuthenticationStateAsync(); + protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task task) { } + } + public sealed partial class AuthorizeRouteView : Microsoft.AspNetCore.Components.RouteView + { + public AuthorizeRouteView() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + } + public partial class AuthorizeView : Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore + { + public AuthorizeView() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; } + } + public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase + { + protected AuthorizeViewCore() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData(); + [System.Diagnostics.DebuggerStepThroughAttribute] + protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; } + } + public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public CascadingAuthenticationState() { } + [Microsoft.AspNetCore.Components.ParameterAttribute] + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } + protected override void OnInitialized() { } + void System.IDisposable.Dispose() { } + } + public partial interface IHostEnvironmentAuthenticationStateProvider + { + void SetAuthenticationState(System.Threading.Tasks.Task authenticationStateTask); + } +} diff --git a/src/Components/Components/src/Auth/AttributeAuthorizeDataCache.cs b/src/Components/Authorization/src/AttributeAuthorizeDataCache.cs similarity index 95% rename from src/Components/Components/src/Auth/AttributeAuthorizeDataCache.cs rename to src/Components/Authorization/src/AttributeAuthorizeDataCache.cs index 92cdf1fb39..c1495fb303 100644 --- a/src/Components/Components/src/Auth/AttributeAuthorizeDataCache.cs +++ b/src/Components/Authorization/src/AttributeAuthorizeDataCache.cs @@ -4,10 +4,9 @@ using System; using System.Collections.Concurrent; using System.Linq; -using System.Reflection; using Microsoft.AspNetCore.Authorization; -namespace Microsoft.AspNetCore.Components.Auth +namespace Microsoft.AspNetCore.Components.Authorization { internal static class AttributeAuthorizeDataCache { diff --git a/src/Components/Components/src/Auth/AuthenticationState.cs b/src/Components/Authorization/src/AuthenticationState.cs similarity index 94% rename from src/Components/Components/src/Auth/AuthenticationState.cs rename to src/Components/Authorization/src/AuthenticationState.cs index d90090c7c8..6a05dce35d 100644 --- a/src/Components/Components/src/Auth/AuthenticationState.cs +++ b/src/Components/Authorization/src/AuthenticationState.cs @@ -4,7 +4,7 @@ using System; using System.Security.Claims; -namespace Microsoft.AspNetCore.Components +namespace Microsoft.AspNetCore.Components.Authorization { ///

/// Provides information about the currently authenticated user, if any. diff --git a/src/Components/Components/src/Auth/AuthenticationStateProvider.cs b/src/Components/Authorization/src/AuthenticationStateProvider.cs similarity index 97% rename from src/Components/Components/src/Auth/AuthenticationStateProvider.cs rename to src/Components/Authorization/src/AuthenticationStateProvider.cs index e9e3e3c772..6fc9af07c7 100644 --- a/src/Components/Components/src/Auth/AuthenticationStateProvider.cs +++ b/src/Components/Authorization/src/AuthenticationStateProvider.cs @@ -4,7 +4,7 @@ using System; using System.Threading.Tasks; -namespace Microsoft.AspNetCore.Components +namespace Microsoft.AspNetCore.Components.Authorization { /// /// Provides information about the authentication state of the current user. diff --git a/src/Components/Components/src/Auth/AuthorizeDataAdapter.cs b/src/Components/Authorization/src/AuthorizeDataAdapter.cs similarity index 95% rename from src/Components/Components/src/Auth/AuthorizeDataAdapter.cs rename to src/Components/Authorization/src/AuthorizeDataAdapter.cs index 3da3e76261..55d369f9af 100644 --- a/src/Components/Components/src/Auth/AuthorizeDataAdapter.cs +++ b/src/Components/Authorization/src/AuthorizeDataAdapter.cs @@ -4,7 +4,7 @@ using System; using Microsoft.AspNetCore.Authorization; -namespace Microsoft.AspNetCore.Components +namespace Microsoft.AspNetCore.Components.Authorization { // This is so the AuthorizeView can avoid implementing IAuthorizeData (even privately) internal class AuthorizeDataAdapter : IAuthorizeData diff --git a/src/Components/Components/src/Auth/AuthorizeRouteView.cs b/src/Components/Authorization/src/AuthorizeRouteView.cs similarity index 98% rename from src/Components/Components/src/Auth/AuthorizeRouteView.cs rename to src/Components/Authorization/src/AuthorizeRouteView.cs index b0d01ab093..2d7ea76698 100644 --- a/src/Components/Components/src/Auth/AuthorizeRouteView.cs +++ b/src/Components/Authorization/src/AuthorizeRouteView.cs @@ -3,10 +3,9 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Components.Auth; using Microsoft.AspNetCore.Components.Rendering; -namespace Microsoft.AspNetCore.Components +namespace Microsoft.AspNetCore.Components.Authorization { /// /// Combines the behaviors of and , diff --git a/src/Components/Components/src/Auth/AuthorizeView.cs b/src/Components/Authorization/src/AuthorizeView.cs similarity index 95% rename from src/Components/Components/src/Auth/AuthorizeView.cs rename to src/Components/Authorization/src/AuthorizeView.cs index 14e4408f73..b66a00d2a4 100644 --- a/src/Components/Components/src/Auth/AuthorizeView.cs +++ b/src/Components/Authorization/src/AuthorizeView.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Authorization; -namespace Microsoft.AspNetCore.Components +namespace Microsoft.AspNetCore.Components.Authorization { /// /// Displays differing content depending on the user's authorization status. diff --git a/src/Components/Components/src/Auth/AuthorizeViewCore.cs b/src/Components/Authorization/src/AuthorizeViewCore.cs similarity index 99% rename from src/Components/Components/src/Auth/AuthorizeViewCore.cs rename to src/Components/Authorization/src/AuthorizeViewCore.cs index cdbce6e8d2..b225bb19bd 100644 --- a/src/Components/Components/src/Auth/AuthorizeViewCore.cs +++ b/src/Components/Authorization/src/AuthorizeViewCore.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Components.Rendering; -namespace Microsoft.AspNetCore.Components +namespace Microsoft.AspNetCore.Components.Authorization { /// /// A base class for components that display differing content depending on the user's authorization status. diff --git a/src/Components/Components/src/Auth/CascadingAuthenticationState.razor b/src/Components/Authorization/src/CascadingAuthenticationState.razor similarity index 96% rename from src/Components/Components/src/Auth/CascadingAuthenticationState.razor rename to src/Components/Authorization/src/CascadingAuthenticationState.razor index 695ebd1972..4993ac1d43 100644 --- a/src/Components/Components/src/Auth/CascadingAuthenticationState.razor +++ b/src/Components/Authorization/src/CascadingAuthenticationState.razor @@ -1,4 +1,3 @@ -@namespace Microsoft.AspNetCore.Components @implements IDisposable @inject AuthenticationStateProvider AuthenticationStateProvider diff --git a/src/Components/Components/src/Auth/IHostEnvironmentAuthenticationStateProvider.cs b/src/Components/Authorization/src/IHostEnvironmentAuthenticationStateProvider.cs similarity index 93% rename from src/Components/Components/src/Auth/IHostEnvironmentAuthenticationStateProvider.cs rename to src/Components/Authorization/src/IHostEnvironmentAuthenticationStateProvider.cs index 77e8d022d4..fc036572a2 100644 --- a/src/Components/Components/src/Auth/IHostEnvironmentAuthenticationStateProvider.cs +++ b/src/Components/Authorization/src/IHostEnvironmentAuthenticationStateProvider.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; -namespace Microsoft.AspNetCore.Components +namespace Microsoft.AspNetCore.Components.Authorization { /// /// An interface implemented by classes that can receive authentication diff --git a/src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj b/src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj new file mode 100644 index 0000000000..84da2d5ea2 --- /dev/null +++ b/src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj @@ -0,0 +1,18 @@ + + + + netstandard2.0;netcoreapp3.0 + netcoreapp3.0 + true + Authentication and authorization support for Blazor applications. + true + true + 3.0 + + + + + + + + diff --git a/src/Components/Components/test/Auth/AuthorizeRouteViewTest.cs b/src/Components/Authorization/test/AuthorizeRouteViewTest.cs similarity index 99% rename from src/Components/Components/test/Auth/AuthorizeRouteViewTest.cs rename to src/Components/Authorization/test/AuthorizeRouteViewTest.cs index 792132e0d0..5a3a5683c7 100644 --- a/src/Components/Components/test/Auth/AuthorizeRouteViewTest.cs +++ b/src/Components/Authorization/test/AuthorizeRouteViewTest.cs @@ -12,7 +12,7 @@ using Microsoft.AspNetCore.Components.Test.Helpers; using Microsoft.Extensions.DependencyInjection; using Xunit; -namespace Microsoft.AspNetCore.Components +namespace Microsoft.AspNetCore.Components.Authorization { public class AuthorizeRouteViewTest { diff --git a/src/Components/Components/test/Auth/AuthorizeViewTest.cs b/src/Components/Authorization/test/AuthorizeViewTest.cs similarity index 99% rename from src/Components/Components/test/Auth/AuthorizeViewTest.cs rename to src/Components/Authorization/test/AuthorizeViewTest.cs index c331e9bbd5..a28b8808c4 100644 --- a/src/Components/Components/test/Auth/AuthorizeViewTest.cs +++ b/src/Components/Authorization/test/AuthorizeViewTest.cs @@ -16,7 +16,7 @@ using Microsoft.AspNetCore.Components.Test.Helpers; using Microsoft.Extensions.DependencyInjection; using Xunit; -namespace Microsoft.AspNetCore.Components +namespace Microsoft.AspNetCore.Components.Authorization { public class AuthorizeViewTest { diff --git a/src/Components/Components/test/Auth/CascadingAuthenticationStateTest.cs b/src/Components/Authorization/test/CascadingAuthenticationStateTest.cs similarity index 99% rename from src/Components/Components/test/Auth/CascadingAuthenticationStateTest.cs rename to src/Components/Authorization/test/CascadingAuthenticationStateTest.cs index ec347b01c2..ab942fe82a 100644 --- a/src/Components/Components/test/Auth/CascadingAuthenticationStateTest.cs +++ b/src/Components/Authorization/test/CascadingAuthenticationStateTest.cs @@ -12,7 +12,7 @@ using Microsoft.AspNetCore.Components.Test.Helpers; using Microsoft.Extensions.DependencyInjection; using Xunit; -namespace Microsoft.AspNetCore.Components +namespace Microsoft.AspNetCore.Components.Authorization { public class CascadingAuthenticationStateTest { diff --git a/src/Components/Authorization/test/Microsoft.AspNetCore.Components.Authorization.Tests.csproj b/src/Components/Authorization/test/Microsoft.AspNetCore.Components.Authorization.Tests.csproj new file mode 100644 index 0000000000..fedc3e7a4e --- /dev/null +++ b/src/Components/Authorization/test/Microsoft.AspNetCore.Components.Authorization.Tests.csproj @@ -0,0 +1,18 @@ + + + + netcoreapp3.0 + Microsoft.AspNetCore.Components.Authorization + + + + + + + + + + + + + diff --git a/src/Components/Components/test/Auth/TestAuthenticationStateProvider.cs b/src/Components/Authorization/test/TestAuthenticationStateProvider.cs similarity index 84% rename from src/Components/Components/test/Auth/TestAuthenticationStateProvider.cs rename to src/Components/Authorization/test/TestAuthenticationStateProvider.cs index 6a84916e93..3e8faf6a50 100644 --- a/src/Components/Components/test/Auth/TestAuthenticationStateProvider.cs +++ b/src/Components/Authorization/test/TestAuthenticationStateProvider.cs @@ -1,9 +1,9 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System.Threading.Tasks; -namespace Microsoft.AspNetCore.Components +namespace Microsoft.AspNetCore.Components.Authorization { public class TestAuthenticationStateProvider : AuthenticationStateProvider { diff --git a/src/Components/Components/test/Auth/TestAuthorizationPolicyProvider.cs b/src/Components/Authorization/test/TestAuthorizationPolicyProvider.cs similarity index 95% rename from src/Components/Components/test/Auth/TestAuthorizationPolicyProvider.cs rename to src/Components/Authorization/test/TestAuthorizationPolicyProvider.cs index b3e903fdb3..7935f77138 100644 --- a/src/Components/Components/test/Auth/TestAuthorizationPolicyProvider.cs +++ b/src/Components/Authorization/test/TestAuthorizationPolicyProvider.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; -namespace Microsoft.AspNetCore.Components +namespace Microsoft.AspNetCore.Components.Authorization { public class TestAuthorizationPolicyProvider : IAuthorizationPolicyProvider { diff --git a/src/Components/Components/test/Auth/TestAuthorizationService.cs b/src/Components/Authorization/test/TestAuthorizationService.cs similarity index 96% rename from src/Components/Components/test/Auth/TestAuthorizationService.cs rename to src/Components/Authorization/test/TestAuthorizationService.cs index d6cc1ff11a..42f2d4b936 100644 --- a/src/Components/Components/test/Auth/TestAuthorizationService.cs +++ b/src/Components/Authorization/test/TestAuthorizationService.cs @@ -7,7 +7,7 @@ using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; -namespace Microsoft.AspNetCore.Components +namespace Microsoft.AspNetCore.Components.Authorization { public class TestAuthorizationService : IAuthorizationService { diff --git a/src/Components/Components/test/Auth/TestIdentity.cs b/src/Components/Authorization/test/TestIdentity.cs similarity index 87% rename from src/Components/Components/test/Auth/TestIdentity.cs rename to src/Components/Authorization/test/TestIdentity.cs index d650c53fe6..936c6ee0ea 100644 --- a/src/Components/Components/test/Auth/TestIdentity.cs +++ b/src/Components/Authorization/test/TestIdentity.cs @@ -3,7 +3,7 @@ using System.Security.Principal; -namespace Microsoft.AspNetCore.Components +namespace Microsoft.AspNetCore.Components.Authorization { public class TestIdentity : IIdentity { diff --git a/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj b/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj index 4b7d80d90a..d750edc189 100644 --- a/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj +++ b/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj @@ -7,5 +7,6 @@ + diff --git a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs index 87bdc951c2..7e729f3bfb 100644 --- a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs +++ b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs @@ -106,6 +106,8 @@ namespace Microsoft.AspNetCore.Blazor.Hosting }); // Needed for authorization + // However, since authorization isn't on by default, we could consider removing these and + // having a separate services.AddBlazorAuthorization() call that brings in the required services. services.AddOptions(); services.TryAdd(ServiceDescriptor.Singleton(typeof(ILogger<>), typeof(WebAssemblyConsoleLogger<>))); diff --git a/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj b/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj index c571f776f0..aa489c210f 100644 --- a/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj +++ b/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -9,6 +9,7 @@ + diff --git a/src/Components/Components.sln b/src/Components/Components.sln index e80d4396f9..3c448f8604 100644 --- a/src/Components/Components.sln +++ b/src/Components/Components.sln @@ -226,6 +226,18 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Web.Tests", "Web\test\Microsoft.AspNetCore.Components.Web.Tests.csproj", "{DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Authorization", "Authorization", "{08791FEE-761D-40EF-B701-1D31FD1E6E53}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Authorization", "Authorization\src\Microsoft.AspNetCore.Components.Authorization.csproj", "{956F540A-3CDA-4913-9373-1A4E8A93BDD8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Authorization.Tests", "Authorization\test\Microsoft.AspNetCore.Components.Authorization.Tests.csproj", "{B13CDE69-ED22-4664-AAD7-686ED8CD5E88}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Forms", "Forms", "{B0EEB429-4C8C-42AA-8822-3058E7DBC98F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Forms", "Forms\src\Microsoft.AspNetCore.Components.Forms.csproj", "{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Forms.Tests", "Forms\test\Microsoft.AspNetCore.Components.Forms.Tests.csproj", "{173D84A3-0F37-480F-AC0F-7E2DBBE32B28}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1436,6 +1448,54 @@ Global {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Release|x64.Build.0 = Release|Any CPU {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Release|x86.ActiveCfg = Release|Any CPU {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Release|x86.Build.0 = Release|Any CPU + {956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Debug|x64.ActiveCfg = Debug|Any CPU + {956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Debug|x64.Build.0 = Debug|Any CPU + {956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Debug|x86.ActiveCfg = Debug|Any CPU + {956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Debug|x86.Build.0 = Debug|Any CPU + {956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Release|Any CPU.Build.0 = Release|Any CPU + {956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Release|x64.ActiveCfg = Release|Any CPU + {956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Release|x64.Build.0 = Release|Any CPU + {956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Release|x86.ActiveCfg = Release|Any CPU + {956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Release|x86.Build.0 = Release|Any CPU + {B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Debug|x64.ActiveCfg = Debug|Any CPU + {B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Debug|x64.Build.0 = Debug|Any CPU + {B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Debug|x86.ActiveCfg = Debug|Any CPU + {B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Debug|x86.Build.0 = Debug|Any CPU + {B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Release|Any CPU.Build.0 = Release|Any CPU + {B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Release|x64.ActiveCfg = Release|Any CPU + {B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Release|x64.Build.0 = Release|Any CPU + {B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Release|x86.ActiveCfg = Release|Any CPU + {B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Release|x86.Build.0 = Release|Any CPU + {A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Debug|x64.ActiveCfg = Debug|Any CPU + {A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Debug|x64.Build.0 = Debug|Any CPU + {A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Debug|x86.ActiveCfg = Debug|Any CPU + {A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Debug|x86.Build.0 = Debug|Any CPU + {A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Release|Any CPU.Build.0 = Release|Any CPU + {A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Release|x64.ActiveCfg = Release|Any CPU + {A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Release|x64.Build.0 = Release|Any CPU + {A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Release|x86.ActiveCfg = Release|Any CPU + {A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Release|x86.Build.0 = Release|Any CPU + {173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Debug|Any CPU.Build.0 = Debug|Any CPU + {173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Debug|x64.ActiveCfg = Debug|Any CPU + {173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Debug|x64.Build.0 = Debug|Any CPU + {173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Debug|x86.ActiveCfg = Debug|Any CPU + {173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Debug|x86.Build.0 = Debug|Any CPU + {173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Release|Any CPU.ActiveCfg = Release|Any CPU + {173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Release|Any CPU.Build.0 = Release|Any CPU + {173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Release|x64.ActiveCfg = Release|Any CPU + {173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Release|x64.Build.0 = Release|Any CPU + {173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Release|x86.ActiveCfg = Release|Any CPU + {173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1543,6 +1603,10 @@ Global {74D21785-2FAB-4266-B7C4-E311EC8EE0DF} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {E4C01A3F-D3C1-4639-A6A9-930E918843DD} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684} = {A27FF193-195B-4474-8E6C-840B2E339373} + {956F540A-3CDA-4913-9373-1A4E8A93BDD8} = {08791FEE-761D-40EF-B701-1D31FD1E6E53} + {B13CDE69-ED22-4664-AAD7-686ED8CD5E88} = {08791FEE-761D-40EF-B701-1D31FD1E6E53} + {A5C132FB-1E03-4DA9-8D05-80755ED1D0ED} = {B0EEB429-4C8C-42AA-8822-3058E7DBC98F} + {173D84A3-0F37-480F-AC0F-7E2DBBE32B28} = {B0EEB429-4C8C-42AA-8822-3058E7DBC98F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CC3C47E1-AD1A-4619-9CD3-E08A0148E5CE} diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj b/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj index f37a151e2d..73094b8c81 100644 --- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj @@ -5,13 +5,14 @@ - - + + - + + diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs index e3d29e6a52..39e576ab5f 100644 --- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs @@ -3,55 +3,6 @@ namespace Microsoft.AspNetCore.Components { - public partial class AuthenticationState - { - public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) { } - public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task task); - public abstract partial class AuthenticationStateProvider - { - protected AuthenticationStateProvider() { } - public event Microsoft.AspNetCore.Components.AuthenticationStateChangedHandler AuthenticationStateChanged { add { } remove { } } - public abstract System.Threading.Tasks.Task GetAuthenticationStateAsync(); - protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task task) { } - } - public sealed partial class AuthorizeRouteView : Microsoft.AspNetCore.Components.RouteView - { - public AuthorizeRouteView() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected override void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } - } - public partial class AuthorizeView : Microsoft.AspNetCore.Components.AuthorizeViewCore - { - public AuthorizeView() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; } - } - public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase - { - protected AuthorizeViewCore() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } - protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData(); - [System.Diagnostics.DebuggerStepThroughAttribute] - protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; } - } public static partial class BindConverter { public static bool FormatValue(bool value, System.Globalization.CultureInfo culture = null) { throw null; } @@ -99,15 +50,6 @@ namespace Microsoft.AspNetCore.Components public static bool TryConvertToString(object obj, System.Globalization.CultureInfo culture, out string value) { throw null; } public static bool TryConvertTo(object obj, System.Globalization.CultureInfo culture, out T value) { throw null; } } - public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable - { - public CascadingAuthenticationState() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } - protected override void OnInitialized() { } - void System.IDisposable.Dispose() { } - } [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] public sealed partial class CascadingParameterAttribute : System.Attribute { @@ -266,10 +208,6 @@ namespace Microsoft.AspNetCore.Components { System.Threading.Tasks.Task HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem item, object arg); } - public partial interface IHostEnvironmentAuthenticationStateProvider - { - void SetAuthenticationState(System.Threading.Tasks.Task authenticationStateTask); - } [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] public sealed partial class InjectAttribute : System.Attribute { @@ -423,78 +361,6 @@ namespace Microsoft.AspNetCore.Components.CompilerServices public static T TypeCheck(T value) { throw null; } } } -namespace Microsoft.AspNetCore.Components.Forms -{ - public partial class DataAnnotationsValidator : Microsoft.AspNetCore.Components.ComponentBase - { - public DataAnnotationsValidator() { } - protected override void OnInitialized() { } - } - public sealed partial class EditContext - { - public EditContext(object model) { } - public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public event System.EventHandler OnFieldChanged { add { } remove { } } - public event System.EventHandler OnValidationRequested { add { } remove { } } - public event System.EventHandler OnValidationStateChanged { add { } remove { } } - public Microsoft.AspNetCore.Components.Forms.FieldIdentifier Field(string fieldName) { throw null; } - public System.Collections.Generic.IEnumerable GetValidationMessages() { throw null; } - public System.Collections.Generic.IEnumerable GetValidationMessages(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } - public System.Collections.Generic.IEnumerable GetValidationMessages(System.Linq.Expressions.Expression> accessor) { throw null; } - public bool IsModified() { throw null; } - public bool IsModified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } - public bool IsModified(System.Linq.Expressions.Expression> accessor) { throw null; } - public void MarkAsUnmodified() { } - public void MarkAsUnmodified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } - public void NotifyFieldChanged(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } - public void NotifyValidationStateChanged() { } - public bool Validate() { throw null; } - } - public static partial class EditContextDataAnnotationsExtensions - { - public static Microsoft.AspNetCore.Components.Forms.EditContext AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext editContext) { throw null; } - } - public sealed partial class FieldChangedEventArgs : System.EventArgs - { - public FieldChangedEventArgs(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } - public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct FieldIdentifier : System.IEquatable - { - private readonly object _dummy; - public FieldIdentifier(object model, string fieldName) { throw null; } - public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public static Microsoft.AspNetCore.Components.Forms.FieldIdentifier Create(System.Linq.Expressions.Expression> accessor) { throw null; } - public bool Equals(Microsoft.AspNetCore.Components.Forms.FieldIdentifier otherIdentifier) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - } - public sealed partial class ValidationMessageStore - { - public ValidationMessageStore(Microsoft.AspNetCore.Components.Forms.EditContext editContext) { } - public System.Collections.Generic.IEnumerable this[Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier] { get { throw null; } } - public System.Collections.Generic.IEnumerable this[System.Linq.Expressions.Expression> accessor] { get { throw null; } } - public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, System.Collections.Generic.IEnumerable messages) { } - public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, string message) { } - public void Add(System.Linq.Expressions.Expression> accessor, System.Collections.Generic.IEnumerable messages) { } - public void Add(System.Linq.Expressions.Expression> accessor, string message) { } - public void Clear() { } - public void Clear(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } - public void Clear(System.Linq.Expressions.Expression> accessor) { } - } - public sealed partial class ValidationRequestedEventArgs : System.EventArgs - { - public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs Empty; - public ValidationRequestedEventArgs() { } - } - public sealed partial class ValidationStateChangedEventArgs : System.EventArgs - { - public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs Empty; - public ValidationStateChangedEventArgs() { } - } -} namespace Microsoft.AspNetCore.Components.Rendering { [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs index e3d29e6a52..39e576ab5f 100644 --- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs @@ -3,55 +3,6 @@ namespace Microsoft.AspNetCore.Components { - public partial class AuthenticationState - { - public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) { } - public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task task); - public abstract partial class AuthenticationStateProvider - { - protected AuthenticationStateProvider() { } - public event Microsoft.AspNetCore.Components.AuthenticationStateChangedHandler AuthenticationStateChanged { add { } remove { } } - public abstract System.Threading.Tasks.Task GetAuthenticationStateAsync(); - protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task task) { } - } - public sealed partial class AuthorizeRouteView : Microsoft.AspNetCore.Components.RouteView - { - public AuthorizeRouteView() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected override void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } - } - public partial class AuthorizeView : Microsoft.AspNetCore.Components.AuthorizeViewCore - { - public AuthorizeView() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; } - } - public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase - { - protected AuthorizeViewCore() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } - protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData(); - [System.Diagnostics.DebuggerStepThroughAttribute] - protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; } - } public static partial class BindConverter { public static bool FormatValue(bool value, System.Globalization.CultureInfo culture = null) { throw null; } @@ -99,15 +50,6 @@ namespace Microsoft.AspNetCore.Components public static bool TryConvertToString(object obj, System.Globalization.CultureInfo culture, out string value) { throw null; } public static bool TryConvertTo(object obj, System.Globalization.CultureInfo culture, out T value) { throw null; } } - public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable - { - public CascadingAuthenticationState() { } - [Microsoft.AspNetCore.Components.ParameterAttribute] - public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { } - protected override void OnInitialized() { } - void System.IDisposable.Dispose() { } - } [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] public sealed partial class CascadingParameterAttribute : System.Attribute { @@ -266,10 +208,6 @@ namespace Microsoft.AspNetCore.Components { System.Threading.Tasks.Task HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem item, object arg); } - public partial interface IHostEnvironmentAuthenticationStateProvider - { - void SetAuthenticationState(System.Threading.Tasks.Task authenticationStateTask); - } [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] public sealed partial class InjectAttribute : System.Attribute { @@ -423,78 +361,6 @@ namespace Microsoft.AspNetCore.Components.CompilerServices public static T TypeCheck(T value) { throw null; } } } -namespace Microsoft.AspNetCore.Components.Forms -{ - public partial class DataAnnotationsValidator : Microsoft.AspNetCore.Components.ComponentBase - { - public DataAnnotationsValidator() { } - protected override void OnInitialized() { } - } - public sealed partial class EditContext - { - public EditContext(object model) { } - public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public event System.EventHandler OnFieldChanged { add { } remove { } } - public event System.EventHandler OnValidationRequested { add { } remove { } } - public event System.EventHandler OnValidationStateChanged { add { } remove { } } - public Microsoft.AspNetCore.Components.Forms.FieldIdentifier Field(string fieldName) { throw null; } - public System.Collections.Generic.IEnumerable GetValidationMessages() { throw null; } - public System.Collections.Generic.IEnumerable GetValidationMessages(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } - public System.Collections.Generic.IEnumerable GetValidationMessages(System.Linq.Expressions.Expression> accessor) { throw null; } - public bool IsModified() { throw null; } - public bool IsModified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } - public bool IsModified(System.Linq.Expressions.Expression> accessor) { throw null; } - public void MarkAsUnmodified() { } - public void MarkAsUnmodified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } - public void NotifyFieldChanged(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } - public void NotifyValidationStateChanged() { } - public bool Validate() { throw null; } - } - public static partial class EditContextDataAnnotationsExtensions - { - public static Microsoft.AspNetCore.Components.Forms.EditContext AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext editContext) { throw null; } - } - public sealed partial class FieldChangedEventArgs : System.EventArgs - { - public FieldChangedEventArgs(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } - public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct FieldIdentifier : System.IEquatable - { - private readonly object _dummy; - public FieldIdentifier(object model, string fieldName) { throw null; } - public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public static Microsoft.AspNetCore.Components.Forms.FieldIdentifier Create(System.Linq.Expressions.Expression> accessor) { throw null; } - public bool Equals(Microsoft.AspNetCore.Components.Forms.FieldIdentifier otherIdentifier) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - } - public sealed partial class ValidationMessageStore - { - public ValidationMessageStore(Microsoft.AspNetCore.Components.Forms.EditContext editContext) { } - public System.Collections.Generic.IEnumerable this[Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier] { get { throw null; } } - public System.Collections.Generic.IEnumerable this[System.Linq.Expressions.Expression> accessor] { get { throw null; } } - public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, System.Collections.Generic.IEnumerable messages) { } - public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, string message) { } - public void Add(System.Linq.Expressions.Expression> accessor, System.Collections.Generic.IEnumerable messages) { } - public void Add(System.Linq.Expressions.Expression> accessor, string message) { } - public void Clear() { } - public void Clear(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } - public void Clear(System.Linq.Expressions.Expression> accessor) { } - } - public sealed partial class ValidationRequestedEventArgs : System.EventArgs - { - public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs Empty; - public ValidationRequestedEventArgs() { } - } - public sealed partial class ValidationStateChangedEventArgs : System.EventArgs - { - public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs Empty; - public ValidationStateChangedEventArgs() { } - } -} namespace Microsoft.AspNetCore.Components.Rendering { [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj b/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj index 622bfe76e2..a889b0f4db 100644 --- a/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj +++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj @@ -1,4 +1,4 @@ - + netstandard2.0;netcoreapp3.0 @@ -7,7 +7,6 @@ true true true - 3.0 @@ -16,12 +15,9 @@ - - - - - + + diff --git a/src/Components/Components/src/Properties/AssemblyInfo.cs b/src/Components/Components/src/Properties/AssemblyInfo.cs index 3c73dd9beb..ef782190ea 100644 --- a/src/Components/Components/src/Properties/AssemblyInfo.cs +++ b/src/Components/Components/src/Properties/AssemblyInfo.cs @@ -1,9 +1,11 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Blazor.Build.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] -[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] -[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Web.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Authorization.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Forms.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Performance, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Server.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Web.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Ignitor, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Ignitor.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/Components/ComponentsNoDeps.slnf b/src/Components/ComponentsNoDeps.slnf index 694b1b7f13..497332bacd 100644 --- a/src/Components/ComponentsNoDeps.slnf +++ b/src/Components/ComponentsNoDeps.slnf @@ -4,6 +4,8 @@ "projects": [ "Analyzers\\src\\Microsoft.AspNetCore.Components.Analyzers.csproj", "Analyzers\\test\\Microsoft.AspNetCore.Components.Analyzers.Tests.csproj", + "Authorization\\src\\Microsoft.AspNetCore.Components.Authorization.csproj", + "Authorization\\test\\Microsoft.AspNetCore.Components.Authorization.Tests.csproj", "Blazor\\Blazor\\src\\Microsoft.AspNetCore.Blazor.csproj", "Blazor\\Blazor\\test\\Microsoft.AspNetCore.Blazor.Tests.csproj", "Blazor\\Build\\src\\Microsoft.AspNetCore.Blazor.Build.csproj", @@ -19,6 +21,8 @@ "Blazor\\testassets\\MonoSanityClient\\MonoSanityClient.csproj", "Blazor\\testassets\\MonoSanity\\MonoSanity.csproj", "Blazor\\testassets\\StandaloneApp\\StandaloneApp.csproj", + "Forms\\src\\Microsoft.AspNetCore.Components.Forms.csproj", + "Forms\\test\\Microsoft.AspNetCore.Components.Forms.Tests.csproj", "Web\\src\\Microsoft.AspNetCore.Components.Web.csproj", "Web\\test\\Microsoft.AspNetCore.Components.Web.Tests.csproj", "Components\\perf\\Microsoft.AspNetCore.Components.Performance.csproj", diff --git a/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.csproj b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.csproj new file mode 100644 index 0000000000..8e24904b63 --- /dev/null +++ b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.csproj @@ -0,0 +1,15 @@ + + + + netstandard2.0;netcoreapp3.0 + + + + + + + + + + + diff --git a/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netcoreapp3.0.cs b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netcoreapp3.0.cs new file mode 100644 index 0000000000..4674ff0fb4 --- /dev/null +++ b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netcoreapp3.0.cs @@ -0,0 +1,75 @@ +// 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. + +namespace Microsoft.AspNetCore.Components.Forms +{ + public partial class DataAnnotationsValidator : Microsoft.AspNetCore.Components.ComponentBase + { + public DataAnnotationsValidator() { } + protected override void OnInitialized() { } + } + public sealed partial class EditContext + { + public EditContext(object model) { } + public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public event System.EventHandler OnFieldChanged { add { } remove { } } + public event System.EventHandler OnValidationRequested { add { } remove { } } + public event System.EventHandler OnValidationStateChanged { add { } remove { } } + public Microsoft.AspNetCore.Components.Forms.FieldIdentifier Field(string fieldName) { throw null; } + public System.Collections.Generic.IEnumerable GetValidationMessages() { throw null; } + public System.Collections.Generic.IEnumerable GetValidationMessages(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } + public System.Collections.Generic.IEnumerable GetValidationMessages(System.Linq.Expressions.Expression> accessor) { throw null; } + public bool IsModified() { throw null; } + public bool IsModified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } + public bool IsModified(System.Linq.Expressions.Expression> accessor) { throw null; } + public void MarkAsUnmodified() { } + public void MarkAsUnmodified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public void NotifyFieldChanged(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public void NotifyValidationStateChanged() { } + public bool Validate() { throw null; } + } + public static partial class EditContextDataAnnotationsExtensions + { + public static Microsoft.AspNetCore.Components.Forms.EditContext AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext editContext) { throw null; } + } + public sealed partial class FieldChangedEventArgs : System.EventArgs + { + public FieldChangedEventArgs(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FieldIdentifier : System.IEquatable + { + private readonly object _dummy; + public FieldIdentifier(object model, string fieldName) { throw null; } + public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public static Microsoft.AspNetCore.Components.Forms.FieldIdentifier Create(System.Linq.Expressions.Expression> accessor) { throw null; } + public bool Equals(Microsoft.AspNetCore.Components.Forms.FieldIdentifier otherIdentifier) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + } + public sealed partial class ValidationMessageStore + { + public ValidationMessageStore(Microsoft.AspNetCore.Components.Forms.EditContext editContext) { } + public System.Collections.Generic.IEnumerable this[Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier] { get { throw null; } } + public System.Collections.Generic.IEnumerable this[System.Linq.Expressions.Expression> accessor] { get { throw null; } } + public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, System.Collections.Generic.IEnumerable messages) { } + public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, string message) { } + public void Add(System.Linq.Expressions.Expression> accessor, System.Collections.Generic.IEnumerable messages) { } + public void Add(System.Linq.Expressions.Expression> accessor, string message) { } + public void Clear() { } + public void Clear(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public void Clear(System.Linq.Expressions.Expression> accessor) { } + } + public sealed partial class ValidationRequestedEventArgs : System.EventArgs + { + public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs Empty; + public ValidationRequestedEventArgs() { } + } + public sealed partial class ValidationStateChangedEventArgs : System.EventArgs + { + public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs Empty; + public ValidationStateChangedEventArgs() { } + } +} diff --git a/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netstandard2.0.cs b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netstandard2.0.cs new file mode 100644 index 0000000000..4674ff0fb4 --- /dev/null +++ b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netstandard2.0.cs @@ -0,0 +1,75 @@ +// 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. + +namespace Microsoft.AspNetCore.Components.Forms +{ + public partial class DataAnnotationsValidator : Microsoft.AspNetCore.Components.ComponentBase + { + public DataAnnotationsValidator() { } + protected override void OnInitialized() { } + } + public sealed partial class EditContext + { + public EditContext(object model) { } + public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public event System.EventHandler OnFieldChanged { add { } remove { } } + public event System.EventHandler OnValidationRequested { add { } remove { } } + public event System.EventHandler OnValidationStateChanged { add { } remove { } } + public Microsoft.AspNetCore.Components.Forms.FieldIdentifier Field(string fieldName) { throw null; } + public System.Collections.Generic.IEnumerable GetValidationMessages() { throw null; } + public System.Collections.Generic.IEnumerable GetValidationMessages(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } + public System.Collections.Generic.IEnumerable GetValidationMessages(System.Linq.Expressions.Expression> accessor) { throw null; } + public bool IsModified() { throw null; } + public bool IsModified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; } + public bool IsModified(System.Linq.Expressions.Expression> accessor) { throw null; } + public void MarkAsUnmodified() { } + public void MarkAsUnmodified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public void NotifyFieldChanged(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public void NotifyValidationStateChanged() { } + public bool Validate() { throw null; } + } + public static partial class EditContextDataAnnotationsExtensions + { + public static Microsoft.AspNetCore.Components.Forms.EditContext AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext editContext) { throw null; } + } + public sealed partial class FieldChangedEventArgs : System.EventArgs + { + public FieldChangedEventArgs(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FieldIdentifier : System.IEquatable + { + private readonly object _dummy; + public FieldIdentifier(object model, string fieldName) { throw null; } + public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public static Microsoft.AspNetCore.Components.Forms.FieldIdentifier Create(System.Linq.Expressions.Expression> accessor) { throw null; } + public bool Equals(Microsoft.AspNetCore.Components.Forms.FieldIdentifier otherIdentifier) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + } + public sealed partial class ValidationMessageStore + { + public ValidationMessageStore(Microsoft.AspNetCore.Components.Forms.EditContext editContext) { } + public System.Collections.Generic.IEnumerable this[Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier] { get { throw null; } } + public System.Collections.Generic.IEnumerable this[System.Linq.Expressions.Expression> accessor] { get { throw null; } } + public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, System.Collections.Generic.IEnumerable messages) { } + public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, string message) { } + public void Add(System.Linq.Expressions.Expression> accessor, System.Collections.Generic.IEnumerable messages) { } + public void Add(System.Linq.Expressions.Expression> accessor, string message) { } + public void Clear() { } + public void Clear(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { } + public void Clear(System.Linq.Expressions.Expression> accessor) { } + } + public sealed partial class ValidationRequestedEventArgs : System.EventArgs + { + public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs Empty; + public ValidationRequestedEventArgs() { } + } + public sealed partial class ValidationStateChangedEventArgs : System.EventArgs + { + public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs Empty; + public ValidationStateChangedEventArgs() { } + } +} diff --git a/src/Components/Components/src/Forms/DataAnnotationsValidator.cs b/src/Components/Forms/src/DataAnnotationsValidator.cs similarity index 100% rename from src/Components/Components/src/Forms/DataAnnotationsValidator.cs rename to src/Components/Forms/src/DataAnnotationsValidator.cs diff --git a/src/Components/Components/src/Forms/EditContext.cs b/src/Components/Forms/src/EditContext.cs similarity index 100% rename from src/Components/Components/src/Forms/EditContext.cs rename to src/Components/Forms/src/EditContext.cs diff --git a/src/Components/Components/src/Forms/EditContextDataAnnotationsExtensions.cs b/src/Components/Forms/src/EditContextDataAnnotationsExtensions.cs similarity index 100% rename from src/Components/Components/src/Forms/EditContextDataAnnotationsExtensions.cs rename to src/Components/Forms/src/EditContextDataAnnotationsExtensions.cs diff --git a/src/Components/Components/src/Forms/FieldChangedEventArgs.cs b/src/Components/Forms/src/FieldChangedEventArgs.cs similarity index 100% rename from src/Components/Components/src/Forms/FieldChangedEventArgs.cs rename to src/Components/Forms/src/FieldChangedEventArgs.cs diff --git a/src/Components/Components/src/Forms/FieldIdentifier.cs b/src/Components/Forms/src/FieldIdentifier.cs similarity index 100% rename from src/Components/Components/src/Forms/FieldIdentifier.cs rename to src/Components/Forms/src/FieldIdentifier.cs diff --git a/src/Components/Components/src/Forms/FieldState.cs b/src/Components/Forms/src/FieldState.cs similarity index 100% rename from src/Components/Components/src/Forms/FieldState.cs rename to src/Components/Forms/src/FieldState.cs diff --git a/src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj b/src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj new file mode 100644 index 0000000000..dba25a048e --- /dev/null +++ b/src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj @@ -0,0 +1,20 @@ + + + + netstandard2.0;netcoreapp3.0 + netcoreapp3.0 + true + Forms and validation support for Blazor applications. + true + true + + + + + + + + + + + diff --git a/src/Components/Components/src/Forms/ValidationMessageStore.cs b/src/Components/Forms/src/ValidationMessageStore.cs similarity index 100% rename from src/Components/Components/src/Forms/ValidationMessageStore.cs rename to src/Components/Forms/src/ValidationMessageStore.cs diff --git a/src/Components/Components/src/Forms/ValidationRequestedEventArgs.cs b/src/Components/Forms/src/ValidationRequestedEventArgs.cs similarity index 100% rename from src/Components/Components/src/Forms/ValidationRequestedEventArgs.cs rename to src/Components/Forms/src/ValidationRequestedEventArgs.cs diff --git a/src/Components/Components/src/Forms/ValidationStateChangedEventArgs.cs b/src/Components/Forms/src/ValidationStateChangedEventArgs.cs similarity index 100% rename from src/Components/Components/src/Forms/ValidationStateChangedEventArgs.cs rename to src/Components/Forms/src/ValidationStateChangedEventArgs.cs diff --git a/src/Components/Components/test/Forms/EditContextDataAnnotationsExtensionsTest.cs b/src/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cs similarity index 100% rename from src/Components/Components/test/Forms/EditContextDataAnnotationsExtensionsTest.cs rename to src/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cs diff --git a/src/Components/Components/test/Forms/EditContextTest.cs b/src/Components/Forms/test/EditContextTest.cs similarity index 100% rename from src/Components/Components/test/Forms/EditContextTest.cs rename to src/Components/Forms/test/EditContextTest.cs diff --git a/src/Components/Components/test/Forms/FieldIdentifierTest.cs b/src/Components/Forms/test/FieldIdentifierTest.cs similarity index 100% rename from src/Components/Components/test/Forms/FieldIdentifierTest.cs rename to src/Components/Forms/test/FieldIdentifierTest.cs diff --git a/src/Components/Forms/test/Microsoft.AspNetCore.Components.Forms.Tests.csproj b/src/Components/Forms/test/Microsoft.AspNetCore.Components.Forms.Tests.csproj new file mode 100644 index 0000000000..e78bb47ed3 --- /dev/null +++ b/src/Components/Forms/test/Microsoft.AspNetCore.Components.Forms.Tests.csproj @@ -0,0 +1,17 @@ + + + + netcoreapp3.0 + Microsoft.AspNetCore.Components.Forms + + + + + + + + + + + + diff --git a/src/Components/Components/test/Forms/ValidationMessageStoreTest.cs b/src/Components/Forms/test/ValidationMessageStoreTest.cs similarity index 100% rename from src/Components/Components/test/Forms/ValidationMessageStoreTest.cs rename to src/Components/Forms/test/ValidationMessageStoreTest.cs diff --git a/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.csproj b/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.csproj index 491c5b8cff..27fcbed2d7 100644 --- a/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.csproj +++ b/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.csproj @@ -5,6 +5,7 @@ + diff --git a/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs b/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs index 5440426852..6227f945a3 100644 --- a/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs +++ b/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs @@ -41,13 +41,13 @@ namespace Microsoft.AspNetCore.Components.Server protected abstract System.TimeSpan RevalidationInterval { get; } protected virtual void Dispose(bool disposing) { } void System.IDisposable.Dispose() { } - protected abstract System.Threading.Tasks.Task ValidateAuthenticationStateAsync(Microsoft.AspNetCore.Components.AuthenticationState authenticationState, System.Threading.CancellationToken cancellationToken); + protected abstract System.Threading.Tasks.Task ValidateAuthenticationStateAsync(Microsoft.AspNetCore.Components.Authorization.AuthenticationState authenticationState, System.Threading.CancellationToken cancellationToken); } - public partial class ServerAuthenticationStateProvider : Microsoft.AspNetCore.Components.AuthenticationStateProvider, Microsoft.AspNetCore.Components.IHostEnvironmentAuthenticationStateProvider + public partial class ServerAuthenticationStateProvider : Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider, Microsoft.AspNetCore.Components.Authorization.IHostEnvironmentAuthenticationStateProvider { public ServerAuthenticationStateProvider() { } - public override System.Threading.Tasks.Task GetAuthenticationStateAsync() { throw null; } - public void SetAuthenticationState(System.Threading.Tasks.Task authenticationStateTask) { } + public override System.Threading.Tasks.Task GetAuthenticationStateAsync() { throw null; } + public void SetAuthenticationState(System.Threading.Tasks.Task authenticationStateTask) { } } } namespace Microsoft.AspNetCore.Components.Server.Circuits diff --git a/src/Components/Server/src/Circuits/CircuitHost.cs b/src/Components/Server/src/Circuits/CircuitHost.cs index 8a5fd717af..dc3a866dd0 100644 --- a/src/Components/Server/src/Circuits/CircuitHost.cs +++ b/src/Components/Server/src/Circuits/CircuitHost.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Security.Claims; using System.Threading; using System.Threading.Tasks; +using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.Web.Rendering; using Microsoft.AspNetCore.SignalR; diff --git a/src/Components/Server/src/Circuits/RevalidatingServerAuthenticationStateProvider.cs b/src/Components/Server/src/Circuits/RevalidatingServerAuthenticationStateProvider.cs index 2895d6df94..0bc4beb7ef 100644 --- a/src/Components/Server/src/Circuits/RevalidatingServerAuthenticationStateProvider.cs +++ b/src/Components/Server/src/Circuits/RevalidatingServerAuthenticationStateProvider.cs @@ -5,6 +5,7 @@ using System; using System.Security.Claims; using System.Threading; using System.Threading.Tasks; +using Microsoft.AspNetCore.Components.Authorization; using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Components.Server diff --git a/src/Components/Server/src/Circuits/ServerAuthenticationStateProvider.cs b/src/Components/Server/src/Circuits/ServerAuthenticationStateProvider.cs index 2708b902e9..c2d88bea07 100644 --- a/src/Components/Server/src/Circuits/ServerAuthenticationStateProvider.cs +++ b/src/Components/Server/src/Circuits/ServerAuthenticationStateProvider.cs @@ -3,6 +3,7 @@ using System; using System.Threading.Tasks; +using Microsoft.AspNetCore.Components.Authorization; namespace Microsoft.AspNetCore.Components.Server { diff --git a/src/Components/Server/src/DependencyInjection/ComponentServiceCollectionExtensions.cs b/src/Components/Server/src/DependencyInjection/ComponentServiceCollectionExtensions.cs index 50bf75132d..53c3be89bf 100644 --- a/src/Components/Server/src/DependencyInjection/ComponentServiceCollectionExtensions.cs +++ b/src/Components/Server/src/DependencyInjection/ComponentServiceCollectionExtensions.cs @@ -4,6 +4,7 @@ using System; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.Routing; using Microsoft.AspNetCore.Components.Server; using Microsoft.AspNetCore.Components.Server.BlazorPack; diff --git a/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj b/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj index 639cdc9d5b..84a0695bdf 100644 --- a/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj +++ b/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.0 @@ -12,6 +12,7 @@ + diff --git a/src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProvider.cs b/src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProvider.cs index 9f791c41eb..dc7d28d502 100644 --- a/src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProvider.cs +++ b/src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProvider.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Security.Claims; using System.Threading; using System.Threading.Tasks; +using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.Server; using Microsoft.Extensions.Logging.Abstractions; using Xunit; diff --git a/src/Components/Server/test/Circuits/ServerAuthenticationStateProviderTest.cs b/src/Components/Server/test/Circuits/ServerAuthenticationStateProviderTest.cs index 6411c25f6b..add061aa04 100644 --- a/src/Components/Server/test/Circuits/ServerAuthenticationStateProviderTest.cs +++ b/src/Components/Server/test/Circuits/ServerAuthenticationStateProviderTest.cs @@ -4,6 +4,7 @@ using System; using System.Security.Claims; using System.Threading.Tasks; +using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.Server.Circuits; using Xunit; diff --git a/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.csproj b/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.csproj index faed8fa4e2..45c17a23fb 100644 --- a/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.csproj +++ b/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.csproj @@ -6,11 +6,13 @@ + + diff --git a/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj b/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj index e4beb19b3a..1f683d5d49 100644 --- a/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj +++ b/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj @@ -12,6 +12,7 @@ + diff --git a/src/Components/test/testassets/BasicTestApp/AuthTest/AuthRouter.razor b/src/Components/test/testassets/BasicTestApp/AuthTest/AuthRouter.razor index 917111085a..e87c94373a 100644 --- a/src/Components/test/testassets/BasicTestApp/AuthTest/AuthRouter.razor +++ b/src/Components/test/testassets/BasicTestApp/AuthTest/AuthRouter.razor @@ -1,3 +1,4 @@ +@using Microsoft.AspNetCore.Components.Authorization @using Microsoft.AspNetCore.Components.Routing @inject NavigationManager NavigationManager diff --git a/src/Components/test/testassets/BasicTestApp/AuthTest/AuthorizeViewCases.razor b/src/Components/test/testassets/BasicTestApp/AuthTest/AuthorizeViewCases.razor index 00b39652f2..f925d65630 100644 --- a/src/Components/test/testassets/BasicTestApp/AuthTest/AuthorizeViewCases.razor +++ b/src/Components/test/testassets/BasicTestApp/AuthTest/AuthorizeViewCases.razor @@ -1,4 +1,5 @@ @page "/AuthorizeViewCases" +@using Microsoft.AspNetCore.Components.Authorization

Scenario: No authorization rule

diff --git a/src/Components/test/testassets/BasicTestApp/AuthTest/CascadingAuthenticationStateConsumer.razor b/src/Components/test/testassets/BasicTestApp/AuthTest/CascadingAuthenticationStateConsumer.razor index 9c61665fc7..7c610d6dee 100644 --- a/src/Components/test/testassets/BasicTestApp/AuthTest/CascadingAuthenticationStateConsumer.razor +++ b/src/Components/test/testassets/BasicTestApp/AuthTest/CascadingAuthenticationStateConsumer.razor @@ -1,5 +1,6 @@ @page "/CascadingAuthenticationStateConsumer" @using System.Security.Claims +@using Microsoft.AspNetCore.Components.Authorization

Cascading authentication state

diff --git a/src/Components/test/testassets/BasicTestApp/AuthTest/ServerAuthenticationStateProvider.cs b/src/Components/test/testassets/BasicTestApp/AuthTest/ServerAuthenticationStateProvider.cs index 40750c9c9d..21cdb5b7ee 100644 --- a/src/Components/test/testassets/BasicTestApp/AuthTest/ServerAuthenticationStateProvider.cs +++ b/src/Components/test/testassets/BasicTestApp/AuthTest/ServerAuthenticationStateProvider.cs @@ -7,6 +7,7 @@ using System.Net.Http; using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Authorization; namespace BasicTestApp.AuthTest { diff --git a/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj b/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj index f67cab709b..ac0e530516 100644 --- a/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj +++ b/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj @@ -16,6 +16,7 @@ + diff --git a/src/Components/test/testassets/BasicTestApp/PrerenderedToInteractiveTransition.razor b/src/Components/test/testassets/BasicTestApp/PrerenderedToInteractiveTransition.razor index af6010e649..5fd043e055 100644 --- a/src/Components/test/testassets/BasicTestApp/PrerenderedToInteractiveTransition.razor +++ b/src/Components/test/testassets/BasicTestApp/PrerenderedToInteractiveTransition.razor @@ -1,5 +1,6 @@ @page "/prerendered-transition" @using Microsoft.AspNetCore.Components +@using Microsoft.AspNetCore.Components.Authorization @inject IComponentContext ComponentContext diff --git a/src/Components/test/testassets/BasicTestApp/Startup.cs b/src/Components/test/testassets/BasicTestApp/Startup.cs index a97b966f69..131a219aa4 100644 --- a/src/Components/test/testassets/BasicTestApp/Startup.cs +++ b/src/Components/test/testassets/BasicTestApp/Startup.cs @@ -5,6 +5,7 @@ using System.Runtime.InteropServices; using BasicTestApp.AuthTest; using Microsoft.AspNetCore.Blazor.Http; using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.Builder; using Microsoft.Extensions.DependencyInjection; diff --git a/src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj b/src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj index d332f274ee..3116c4aefc 100644 --- a/src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj +++ b/src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj @@ -12,5 +12,6 @@ + diff --git a/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj b/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj index 316a0d4171..aa272b1397 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj +++ b/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj @@ -23,6 +23,7 @@ Microsoft.AspNetCore.Mvc.ViewComponent + diff --git a/src/Mvc/Mvc.ViewFeatures/src/RazorComponents/StaticComponentRenderer.cs b/src/Mvc/Mvc.ViewFeatures/src/RazorComponents/StaticComponentRenderer.cs index aadfd76cae..72e89faf5f 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/RazorComponents/StaticComponentRenderer.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/RazorComponents/StaticComponentRenderer.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Text.Encodings.Web; using System.Threading.Tasks; using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.Rendering; using Microsoft.AspNetCore.Components.Routing; using Microsoft.AspNetCore.Http; diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Areas/Identity/RevalidatingIdentityAuthenticationStateProvider.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Areas/Identity/RevalidatingIdentityAuthenticationStateProvider.cs index dd4fb3e33e..1921a7f416 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Areas/Identity/RevalidatingIdentityAuthenticationStateProvider.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Areas/Identity/RevalidatingIdentityAuthenticationStateProvider.cs @@ -3,6 +3,7 @@ using System.Security.Claims; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.Server; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.DependencyInjection; diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Startup.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Startup.cs index 7a6742000f..d081a6df8f 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Startup.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Startup.cs @@ -18,6 +18,7 @@ using Microsoft.AspNetCore.Authentication.AzureADB2C.UI; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Components; #if (IndividualLocalAuth) +using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity.UI; #endif diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/_Imports.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/_Imports.razor index b9abe31eac..4830194af8 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/_Imports.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/_Imports.razor @@ -1,5 +1,6 @@ @using System.Net.Http @using Microsoft.AspNetCore.Authorization +@using Microsoft.AspNetCore.Components.Authorization @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @using Microsoft.JSInterop From 29cf7ecb80b118a3ea0fd3d9bdca5cf2d0eb96b0 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Mon, 12 Aug 2019 13:38:44 -0700 Subject: [PATCH 16/24] Remove Blazor VSIX This is no longer shipped, because the templates installed by `dotnet new -i` show up in VS now. Removing it now so we don't have to keep it around in servicing forever. --- eng/Build.props | 1 - .../src/AboutDialogInfoAttribute.cs | 56 ------ .../src/AutoRebuild/AutoRebuildService.cs | 147 -------------- .../src/AutoRebuild/BuildEventsWatcher.cs | 184 ------------------ .../AutoRebuild/StreamProtocolExtensions.cs | 49 ----- .../BlazorExtension/src/BlazorPackage.cs | 44 ----- .../BlazorExtension/src/CodeSnippets.pkgdef | 2 - .../src/CodeSnippets/Blazor/para.snippet | 31 --- .../src/Content/WebConfiguration.png | Bin 3965 -> 0 bytes ...rosoft.VisualStudio.BlazorExtension.csproj | 148 -------------- .../Blazor/BlazorExtension/src/Resources.resx | 132 ------------- .../src/Resources/BlazorPackage.ico | Bin 428446 -> 0 bytes .../BlazorExtension/src/Templates.pkgdef | 2 - .../src/source.extension.vsixmanifest | 25 --- src/Components/Components.sln | 15 -- src/Components/ComponentsNoDeps.slnf | 1 - 16 files changed, 837 deletions(-) delete mode 100644 src/Components/Blazor/BlazorExtension/src/AboutDialogInfoAttribute.cs delete mode 100644 src/Components/Blazor/BlazorExtension/src/AutoRebuild/AutoRebuildService.cs delete mode 100644 src/Components/Blazor/BlazorExtension/src/AutoRebuild/BuildEventsWatcher.cs delete mode 100644 src/Components/Blazor/BlazorExtension/src/AutoRebuild/StreamProtocolExtensions.cs delete mode 100644 src/Components/Blazor/BlazorExtension/src/BlazorPackage.cs delete mode 100644 src/Components/Blazor/BlazorExtension/src/CodeSnippets.pkgdef delete mode 100644 src/Components/Blazor/BlazorExtension/src/CodeSnippets/Blazor/para.snippet delete mode 100644 src/Components/Blazor/BlazorExtension/src/Content/WebConfiguration.png delete mode 100644 src/Components/Blazor/BlazorExtension/src/Microsoft.VisualStudio.BlazorExtension.csproj delete mode 100644 src/Components/Blazor/BlazorExtension/src/Resources.resx delete mode 100644 src/Components/Blazor/BlazorExtension/src/Resources/BlazorPackage.ico delete mode 100644 src/Components/Blazor/BlazorExtension/src/Templates.pkgdef delete mode 100644 src/Components/Blazor/BlazorExtension/src/source.extension.vsixmanifest diff --git a/eng/Build.props b/eng/Build.props index ef1a7776b6..e47402faf8 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -17,7 +17,6 @@ ()?.InformationalVersion; - - using (var key = context.CreateKey(GetKeyName())) - { - key.SetValue(null, _nameId); - key.SetValue("Package", Guid.Parse(_packageGuid).ToString("B")); - key.SetValue("ProductDetails", _detailsId); - key.SetValue("UseInterface", false); - key.SetValue("UseVSProductID", false); - - if (version != null) - { - key.SetValue("PID", version); - } - } - } - - public override void Unregister(RegistrationContext context) - { - context.RemoveKey(GetKeyName()); - } - } -} diff --git a/src/Components/Blazor/BlazorExtension/src/AutoRebuild/AutoRebuildService.cs b/src/Components/Blazor/BlazorExtension/src/AutoRebuild/AutoRebuildService.cs deleted file mode 100644 index f3aa9b195b..0000000000 --- a/src/Components/Blazor/BlazorExtension/src/AutoRebuild/AutoRebuildService.cs +++ /dev/null @@ -1,147 +0,0 @@ -// 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.VisualStudio.Shell.Interop; -using System; -using System.Diagnostics; -using System.IO; -using System.IO.Pipes; -using System.Security.AccessControl; -using System.Security.Principal; -using System.Threading; -using System.Threading.Tasks; -using Package = Microsoft.VisualStudio.Shell.Package; -using ThreadHelper = Microsoft.VisualStudio.Shell.ThreadHelper; - -namespace Microsoft.VisualStudio.BlazorExtension -{ - /// - /// The counterpart to VSForWindowsRebuildService.cs in the Blazor.Server project. - /// Listens for named pipe connections and rebuilds projects on request. - /// - internal class AutoRebuildService - { - private const int _protocolVersion = 1; - private readonly BuildEventsWatcher _buildEventsWatcher; - private readonly string _pipeName; - - public AutoRebuildService(BuildEventsWatcher buildEventsWatcher) - { - _buildEventsWatcher = buildEventsWatcher ?? throw new ArgumentNullException(nameof(buildEventsWatcher)); - _pipeName = $"BlazorAutoRebuild\\{Process.GetCurrentProcess().Id}"; - } - - public void Listen() - { - _ = AddBuildServiceNamedPipeServerAsync(); - } - - private Task AddBuildServiceNamedPipeServerAsync() - { - return Task.Factory.StartNew(async () => - { - try - { - var identity = WindowsIdentity.GetCurrent(); - var identifier = identity.Owner; - var security = new PipeSecurity(); - - // Restrict access to just this account. - var rule = new PipeAccessRule(identifier, PipeAccessRights.ReadWrite | PipeAccessRights.CreateNewInstance, AccessControlType.Allow); - security.AddAccessRule(rule); - security.SetOwner(identifier); - - // And our current elevation level - var principal = new WindowsPrincipal(identity); - var isServerElevated = principal.IsInRole(WindowsBuiltInRole.Administrator); - - using (var serverPipe = new NamedPipeServerStream( - _pipeName, - PipeDirection.InOut, - NamedPipeServerStream.MaxAllowedServerInstances, - PipeTransmissionMode.Byte, - PipeOptions.Asynchronous | PipeOptions.WriteThrough, - 0x10000, // 64k input buffer - 0x10000, // 64k output buffer - security, - HandleInheritability.None)) - { - // As soon as we receive a connection, spin up another background - // listener to wait for the next connection - await serverPipe.WaitForConnectionAsync(); - _ = AddBuildServiceNamedPipeServerAsync(); - - await HandleRequestAsync(serverPipe, isServerElevated); - } - } - catch (Exception ex) - { - await AttemptLogErrorAsync( - $"Error in Blazor AutoRebuildService:\n{ex.Message}\n{ex.StackTrace}"); - } - }, CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default); - } - - private async Task HandleRequestAsync(NamedPipeServerStream stream, bool isServerElevated) - { - // Protocol: - // 1. Send a "protocol version" number to the client - // 2. Receive the project path from the client - // If it is the special string "abort", gracefully disconnect and end - // This is to allow for mismatches between server and client protocol version - // 3. Receive the "if not built since" timestamp from the client - // 4. Perform the build, then send back the success/failure result flag - // Keep in sync with VSForWindowsRebuildService.cs in the Blazor.Server project - // In the future we may extend this to getting back build error details - await stream.WriteIntAsync(_protocolVersion); - var projectPath = await stream.ReadStringAsync(); - - // We can't do the security check for elevation until we read from the stream. - if (isServerElevated != IsClientElevated(stream)) - { - return; - } - - if (projectPath.Equals("abort", StringComparison.Ordinal)) - { - return; - } - - var allowExistingBuildsSince = await stream.ReadDateTimeAsync(); - var buildResult = await _buildEventsWatcher.PerformBuildAsync(projectPath, allowExistingBuildsSince); - await stream.WriteBoolAsync(buildResult); - } - - private async Task AttemptLogErrorAsync(string message) - { - if (!ThreadHelper.CheckAccess()) - { - await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); - } - - var outputWindow = (IVsOutputWindow)Package.GetGlobalService(typeof(SVsOutputWindow)); - if (outputWindow != null) - { - outputWindow.GetPane(VSConstants.OutputWindowPaneGuid.BuildOutputPane_guid, out var pane); - if (pane != null) - { - pane.OutputString(message); - pane.Activate(); - } - } - } - - private bool? IsClientElevated(NamedPipeServerStream stream) - { - bool? isClientElevated = null; - stream.RunAsClient(() => - { - var identity = WindowsIdentity.GetCurrent(ifImpersonating: true); - var principal = new WindowsPrincipal(identity); - isClientElevated = principal.IsInRole(WindowsBuiltInRole.Administrator); - }); - - return isClientElevated; - } - } -} diff --git a/src/Components/Blazor/BlazorExtension/src/AutoRebuild/BuildEventsWatcher.cs b/src/Components/Blazor/BlazorExtension/src/AutoRebuild/BuildEventsWatcher.cs deleted file mode 100644 index e05f05f28f..0000000000 --- a/src/Components/Blazor/BlazorExtension/src/AutoRebuild/BuildEventsWatcher.cs +++ /dev/null @@ -1,184 +0,0 @@ -// 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 System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; - -namespace Microsoft.VisualStudio.BlazorExtension -{ - /// - /// Watches for Blazor project build events, starts new builds, and tracks builds in progress. - /// - internal class BuildEventsWatcher : IVsUpdateSolutionEvents2 - { - private const string BlazorProjectCapability = "Blazor"; - private readonly IVsSolution _vsSolution; - private readonly IVsSolutionBuildManager _vsBuildManager; - private readonly object mostRecentBuildInfosLock = new object(); - private readonly Dictionary mostRecentBuildInfos - = new Dictionary(StringComparer.OrdinalIgnoreCase); - - public BuildEventsWatcher(IVsSolution vsSolution, IVsSolutionBuildManager vsBuildManager) - { - _vsSolution = vsSolution ?? throw new ArgumentNullException(nameof(vsSolution)); - _vsBuildManager = vsBuildManager ?? throw new ArgumentNullException(nameof(vsBuildManager)); - } - - public Task PerformBuildAsync(string projectPath, DateTime allowExistingBuildsSince) - { - BuildInfo newBuildInfo; - - lock (mostRecentBuildInfosLock) - { - if (mostRecentBuildInfos.TryGetValue(projectPath, out var existingInfo)) - { - // If there's a build in progress, we'll join that even if it was started - // before allowExistingBuildsSince, because it's too messy to cancel - // in-progress builds. On rare occasions if the user is editing files while - // a build is in progress they *might* see a not-latest build when they - // reload, but then they just have to reload again. - var acceptBuild = !existingInfo.TaskCompletionSource.Task.IsCompleted - || existingInfo.StartTime > allowExistingBuildsSince; - if (acceptBuild) - { - return existingInfo.TaskCompletionSource.Task; - } - } - - // We're going to start a new build now. Track the BuildInfo for it even - // before it starts so other incoming build requests can join it. - mostRecentBuildInfos[projectPath] = newBuildInfo = new BuildInfo(); - } - - return PerformNewBuildAsync(projectPath, newBuildInfo); - } - - public int UpdateSolution_Begin(ref int pfCancelUpdate) - => VSConstants.S_OK; - - public int UpdateSolution_Done(int fSucceeded, int fModified, int fCancelCommand) - => VSConstants.S_OK; - - public int UpdateSolution_StartUpdate(ref int pfCancelUpdate) - => VSConstants.S_OK; - - public int UpdateSolution_Cancel() - => VSConstants.S_OK; - - public int OnActiveProjectCfgChange(IVsHierarchy pIVsHierarchy) - => VSConstants.S_OK; - - public int UpdateProjectCfg_Begin(IVsHierarchy pHierProj, IVsCfg pCfgProj, IVsCfg pCfgSln, uint dwAction, ref int pfCancel) - { - ThreadHelper.ThrowIfNotOnUIThread(); - - if (IsBlazorProject(pHierProj)) - { - // This method runs both for manually-invoked builds and for builds triggered automatically - // by PerformNewBuildAsync(). In the case where it's a manually-invoked build, make sure - // there's an in-progress BuildInfo so that if there are further builds requests while the - // build is still in progress we can join them onto this existing build. - - var projectPath = GetProjectPath(pHierProj); - lock (mostRecentBuildInfosLock) - { - var hasBuildInProgress = - mostRecentBuildInfos.TryGetValue(projectPath, out var existingInfo) - && !existingInfo.TaskCompletionSource.Task.IsCompleted; - if (!hasBuildInProgress) - { - mostRecentBuildInfos[projectPath] = new BuildInfo(); - } - } - } - - return VSConstants.S_OK; - } - - public int UpdateProjectCfg_Done(IVsHierarchy pHierProj, IVsCfg pCfgProj, IVsCfg pCfgSln, uint dwAction, int fSuccess, int fCancel) - { - ThreadHelper.ThrowIfNotOnUIThread(); - - if (IsBlazorProject(pHierProj)) - { - var buildResult = fSuccess == 1; - var projectPath = GetProjectPath(pHierProj); - - // Mark pending build info as completed - BuildInfo foundInfo = null; - lock (mostRecentBuildInfosLock) - { - mostRecentBuildInfos.TryGetValue(projectPath, out foundInfo); - } - if (foundInfo != null) - { - foundInfo.TaskCompletionSource.TrySetResult(buildResult); - } - } - - return VSConstants.S_OK; - } - - private async Task PerformNewBuildAsync(string projectPath, BuildInfo buildInfo) - { - // Switch to the UI thread and request the build - var didStartBuild = await ThreadHelper.JoinableTaskFactory.RunAsync(async delegate - { - await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); - - var hr = _vsSolution.GetProjectOfUniqueName(projectPath, out var hierarchy); - if (hr != VSConstants.S_OK) - { - return false; - } - - hr = _vsBuildManager.StartSimpleUpdateProjectConfiguration( - hierarchy, - /* not used */ null, - /* not used */ null, - (uint)VSSOLNBUILDUPDATEFLAGS.SBF_OPERATION_BUILD, - /* other flags */ 0, - /* suppress dialogs */ 1); - if (hr != VSConstants.S_OK) - { - return false; - } - - return true; - }); - - if (!didStartBuild) - { - // Since the build didn't start, make sure nobody's waiting for it - buildInfo.TaskCompletionSource.TrySetResult(false); - } - - return await buildInfo.TaskCompletionSource.Task; - } - - private static bool IsBlazorProject(IVsHierarchy pHierProj) - => pHierProj.IsCapabilityMatch(BlazorProjectCapability); - - private static string GetProjectPath(IVsHierarchy pHierProj) - { - ThreadHelper.ThrowIfNotOnUIThread(); - ErrorHandler.ThrowOnFailure(((IVsProject)pHierProj).GetMkDocument((uint)VSConstants.VSITEMID.Root, out var projectPath), VSConstants.E_NOTIMPL); - return projectPath; - } - - class BuildInfo - { - public DateTime StartTime { get; } - public TaskCompletionSource TaskCompletionSource { get; } - - public BuildInfo() - { - StartTime = DateTime.Now; - TaskCompletionSource = new TaskCompletionSource(); - } - } - } -} diff --git a/src/Components/Blazor/BlazorExtension/src/AutoRebuild/StreamProtocolExtensions.cs b/src/Components/Blazor/BlazorExtension/src/AutoRebuild/StreamProtocolExtensions.cs deleted file mode 100644 index 4c13dc9588..0000000000 --- a/src/Components/Blazor/BlazorExtension/src/AutoRebuild/StreamProtocolExtensions.cs +++ /dev/null @@ -1,49 +0,0 @@ -// 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 System; -using System.IO; -using System.Text; -using System.Threading.Tasks; - -namespace Microsoft.VisualStudio.BlazorExtension -{ - internal static class StreamProtocolExtensions - { - public static async Task ReadStringAsync(this Stream stream) - { - var length = BitConverter.ToInt32(await ReadBytesAsync(stream, 4), 0); - var utf8Bytes = await ReadBytesAsync(stream, length); - return Encoding.UTF8.GetString(utf8Bytes); - } - - public static async Task ReadDateTimeAsync(this Stream stream) - { - var ticksBytes = await ReadBytesAsync(stream, 8); - var ticks = BitConverter.ToInt64(ticksBytes, 0); - return new DateTime(ticks); - } - - public static async Task WriteBoolAsync(this Stream stream, bool value) - { - var byteVal = value ? (byte)1 : (byte)0; - await stream.WriteAsync(new[] { byteVal }, 0, 1); - } - - public static async Task WriteIntAsync(this Stream stream, int value) - { - await stream.WriteAsync(BitConverter.GetBytes(value), 0, 4); - } - - private static async Task ReadBytesAsync(Stream stream, int exactLength) - { - var buf = new byte[exactLength]; - var bytesRead = 0; - while (bytesRead < exactLength) - { - bytesRead += await stream.ReadAsync(buf, bytesRead, exactLength - bytesRead); - } - return buf; - } - } -} diff --git a/src/Components/Blazor/BlazorExtension/src/BlazorPackage.cs b/src/Components/Blazor/BlazorExtension/src/BlazorPackage.cs deleted file mode 100644 index fd956856ac..0000000000 --- a/src/Components/Blazor/BlazorExtension/src/BlazorPackage.cs +++ /dev/null @@ -1,44 +0,0 @@ -// 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 System; -using System.Runtime.InteropServices; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; -using Task = System.Threading.Tasks.Task; - -namespace Microsoft.VisualStudio.BlazorExtension -{ - // We mainly have a package so we can have an "About" dialog entry. - [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)] - [AboutDialogInfo(PackageGuidString, "ASP.NET Core Blazor Language Services", "#110", "112")] - [Guid(BlazorPackage.PackageGuidString)] - [ProvideAutoLoad(UIContextGuids80.SolutionExists, PackageAutoLoadFlags.BackgroundLoad)] - public sealed class BlazorPackage : AsyncPackage - { - public const string PackageGuidString = "d9fe04bc-57a7-4107-915e-3a5c2f9e19fb"; - - protected async override Task InitializeAsync(CancellationToken cancellationToken, IProgress progress) - { - await base.InitializeAsync(cancellationToken, progress); - - await JoinableTaskFactory.SwitchToMainThreadAsync(); - - // Create build watcher. No need to unadvise, as this only happens once anyway. - var solution = (IVsSolution)await GetServiceAsync(typeof(IVsSolution)); - var buildManager = (IVsSolutionBuildManager)await GetServiceAsync(typeof(SVsSolutionBuildManager)); - - // According to the docs, this can happen if VS shuts down while our package is loading. - if (solution == null || buildManager == null) - { - var buildWatcher = new BuildEventsWatcher(solution, buildManager); - var hr = buildManager.AdviseUpdateSolutionEvents(buildWatcher, out var cookie); - Marshal.ThrowExceptionForHR(hr); - - new AutoRebuildService(buildWatcher).Listen(); - } - } - } -} diff --git a/src/Components/Blazor/BlazorExtension/src/CodeSnippets.pkgdef b/src/Components/Blazor/BlazorExtension/src/CodeSnippets.pkgdef deleted file mode 100644 index 53ad976e64..0000000000 --- a/src/Components/Blazor/BlazorExtension/src/CodeSnippets.pkgdef +++ /dev/null @@ -1,2 +0,0 @@ -[$RootKey$\Languages\CodeExpansions\CSharp\Paths] -"Blazor"="$PackageFolder$\CodeSnippets\Blazor" \ No newline at end of file diff --git a/src/Components/Blazor/BlazorExtension/src/CodeSnippets/Blazor/para.snippet b/src/Components/Blazor/BlazorExtension/src/CodeSnippets/Blazor/para.snippet deleted file mode 100644 index 25959d17f0..0000000000 --- a/src/Components/Blazor/BlazorExtension/src/CodeSnippets/Blazor/para.snippet +++ /dev/null @@ -1,31 +0,0 @@ - - - -
- para - para - Code snippet for an automatically implemented parameter for Blazor - Microsoft - - Expansion - -
- - - - type - Parameter type - int - - - property - Parameter name - MyParameter - - - - - - -
-
\ No newline at end of file diff --git a/src/Components/Blazor/BlazorExtension/src/Content/WebConfiguration.png b/src/Components/Blazor/BlazorExtension/src/Content/WebConfiguration.png deleted file mode 100644 index 87f68b072610b246940638d47934fcbd90220efc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3965 zcmV-@4}$QCP)Hgv7PT>35`fZqUoBPjFuXM-gftN06q z8%du4AxA$@vCCLgkOp8D-~Z|9E0r%VESju9x&#Q|zwa2NH3yo0fQt}-|MZVnE6ukT zDz|UlQvgVh0Kx17zPrqH?lHOIo;5A)dvNa&+F$9(C#SEfRsfVJ>>k1FkjB@+Scg`m)ZBYLijS&j!jpnQLPw4#e1NMiawJaIV^fWI%?s7y|6 zj&uV$0fK+$LQ^JO?tvC!rU4%r-MC)Q({+)1Du1`;MY>hUR<)!W$(4jGzZX7u#INQq ze)yvmTKb)h>%56c%7^LK1cH3saS_jM-53P`1cv~H1{zSfrU6QVu3`##dGlDS(*Em> zRiKP-+vEYg6nw1GZY`+_7T?+M8Rg9WLkr1bzllZ3zh`pPXpBCQck zEQz4~Pp^N<5=<&Nen~6`?+FpJOFmDB)py$+^ zpC@AON58wSGP-F!_3g+OE9p-!$N$f*`w_Wykg8+AH@rOScO0UrJL6_RQRZ8$If+M{l(Tyfgk=LRg~)Fr9J*JfU&%bCK~x z>(0Lm?Rf&^PE`Sa(h&6FNAdaA0SUAocDnd%x`H%{Nbe{tMP>q!3oYQXiTv5)^SdQ| zEvp51X4H!SNW<92Hk7-;9Hfw-|l9;A^V)>oh1c6=) z503rpV}P-wc4&Ui{Q}80Xw_mN9I~3S2(C;U3Oxt`29MhX9Ij z3dR!f?bLrX004+wx`gEYr{4SvTo56cHId+r;@1i2l*S~0 z)cePj#YAYU7F=lzENXhivuPxN*jR$HTYy$S3sCpeetPyq)(+s8iv-jYCVx=K1I(s> z7t0}}7a$Fv8DH(Mzcn3Y`h5o@F}(yhFx<5jjK4RLfWYwZ2R|9~Jd};ehKklevJ|_{ z_iF~#3>`DA(iaH~8kPTyfPFTRK$mhbKEIEUW|0{X$CQl#t$tg=>PjI5rfbu%TAuF$ zJOvGWu0Qw!96>7gwv?2kh>yF&Diz86TMAqALIBDACzM>>NBd=~rG5U7Qf8{{V(yLA zGPJp|8iN8ttU#Hx|C+o|N-RK43H~&5i7B*iwbTnp_+Fcz_a}iR9>8TpRta+#`(e~( zzg4l*9@>w#Ml$b{)3Lyp0#f>db%Ah}LJ z@E{ISOmDvO<9%C==3k_W|JRB?3}7G*CXhp)X7lyScV7a0%S11vls2@HTt_~5%?AL8 z%#V!5_a{J(-NNzi08HHZjw<9;QYM18DDxlHcwqF}dY+C4Fzw)T5Ib3PE6^|7fw;H< zTt#l@5f!;B<{uFkFs*2uYt7lZNC^@VL`G?S7TrQ`H^6U^y+{V8NR#egKLTu42;f?C z<|K}tz53~*qMZA~Drzm*{Iy><|3Uzd0FZ}P{;aC~#1K)%qkO@)6B}hHs`j5D_)`er zJb2*acL|=<;!*BmCwA7e0u0=Ey>%1#nowdhH)u~eVcWV*xgGM$1?IQ z+V4mJ%bL@)mMKvdPTFiHe(*AD*|Bqrwdqvn!;t{~uO;yh7D*4Y18nX3Z~MD1J^S&F zmzY5`$Vmo1(U^8J^Q`?8=`2`Uxvt>NI@f5@5kmlc~`Y2l%9jboip~f#1ubV8VJBDMH}In7KS1z%XmHxvgSElWnxk;N{p~OH!&BCI!v%@@ z;}f9m;mfJm>84UYZ-5nu`q9M_#G5Tdd*W;afwY6j1Rzn*#3qwGz^C9-b6ynr;K75a z<&UtM)4Ne~=*-v;td)x(4;7kFlm63@_HBnYPoiz%|#ZhX#L1E#L5ADod8hs8^!No`g{vI;*W<}{IwoA z*a5%cfv>$6&>bJTrXB*-{k9fV5%rdJ9?)^a$!-_$_qu@Z+YD-GXX$w$!xm9YvQl>+ zZW5679RAa5(mcvvbOLnCig%SW=vp*S@Fm3&g#-|4$be_HO%fH&xoinww*r=(I0SmK zTuE8D$P(ru0zRoTf@8d`B^LrHR)Eb|rtULi|tc7Qj$$) z$r7%}ZLmb2U{b(WiaS6utEPWie1E!9H5MeW1QUibv6Te43fq;10R2UhItg4` zrf5t)t5@|P6yO0}>xdHQ5?d4$e4PM#JfH`L6g!mcKwUr$8PK9U0PhW#@M&FmNr6m) z%>sh26F?^c4Wm6qt$_q+Oj0@d>S-N+bI!Jp)x}^k# z_E*gMPXrM+Sk|-k0Pc}f(dyJ=mj%F=LQjzi;7oKQDgks7 zuzlKC-H_>FiX>=X>BK)|d8>CRnjQ#{V)iiIy|5A! zDQfo;KzBdeI^cl-dAf^{E-8@icUA5H?27-sQwpF10fOXpI(YacNFYFvK!6~D073o_ XasjZ};3mj$00000NkvXXu0mjf# - - - net472 - - - RoslynDev - - - CommonExtensions - Microsoft\Blazor - - - false - - - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - false - - false - true - true - false - true - - - false - - - - - - - true - false - true - - true - true - - - - - <_TemplatePackage Include="$(ArtifactsShippingPackagesDir)Microsoft.AspNetCore.Blazor.Templates.*.nupkg" /> - - - - - - - ProjectTemplates\ - - - - - - - - - - - - - - - - - Content\THIRD-PARTY-NOTICES.txt - - - Content\LICENSE.txt - - - - - - - - - - - - - - - - - false - - - - - true - VSPackage - - - - - - - - - - - - - - - - - - 16.0.$(VersionSuffixDateStamp).$(VersionSuffixBuildOfTheDay) - - 42.42.42.4242424 - $(VsixVersion) - - diff --git a/src/Components/Blazor/BlazorExtension/src/Resources.resx b/src/Components/Blazor/BlazorExtension/src/Resources.resx deleted file mode 100644 index d0fc1b1a60..0000000000 --- a/src/Components/Blazor/BlazorExtension/src/Resources.resx +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ASP.NET Core Blazor Language Services - About dialog title - - - Provides Visual Studio support for ASP.NET Core Blazor - About dialog description - - - - Resources\BlazorPackage.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - \ No newline at end of file diff --git a/src/Components/Blazor/BlazorExtension/src/Resources/BlazorPackage.ico b/src/Components/Blazor/BlazorExtension/src/Resources/BlazorPackage.ico deleted file mode 100644 index d323b07fb8d8b417bfc12e7c46dea88bee17760c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 428446 zcmeHwzmFYBl3qPFmz*Euki&m~ZRmipgt26b1bqtY(xX9RJvsvBK&Ri~Ag*@=9a#iM za>RpVtU*8~r_ZFd4k7cV&(R$~0mE^Iv%p}VGO8-7vf^b_R#j%ytLpdl?(59T$c&8m z;`{Q|D|Yu3#iqDf6vb`VUM>Fc--_b@xT|l!t*@^Y#ee+oMR9ssUH{vaqWB-L-R#@d z^*5WM_=o@L7PzlX@mcZBzuOf5`+w2;>iQqQDvE#p^Tw^OuRkk_=l{HM>#OTO{H`ee z{l7XV<@(d&o71bsfBk=(;{JWIyXyx<@%F~G+TUsMkAG7X|Mx##tNpoa=jR{(^R?RF zY4L}vMe!g0%eCU0%3)Escqy;)Yg;w@-<^SM+ilgj@2=}!+v5EE+!=P||BKy@dhX@^ zM?>_@`*PQ_e0}ux^t-cc?l!^xKI&~B_|Jm?_}6mI@6Cfg^bh{|tZVz=UxmPTMqi9? zjDJSke~0}m1b~05dB4Z}0RLI$w$J#4Fk>6H{v7J_xNQA-Yy(8M+kIUAd$2Q>KV(#}CpAcqj~A*v73thx$A&TYnzg zfPag*-(!42n6Zspe-8C|T(S-Mz(SfY3FNy9*<%Fw&s41 z@d;tZHg5en)aP;8`t#TZ{C(8hKI0R@jBVWdbEwbbvi0Y&4fwa1`#r`dgc;ko_2*EZ z$7So!V;k`IQE&Thrj4{dsHy{w?NykMRj%#x`#KIn?KI+4}R?2K;^0+dktH!i;U)`g5qyxb^2ypT}kE&tn_#_fc>Aj86zNwsGsvp+1kx)}O~V;NN2I_ZXiLW^Ciu zpF@2fm#sgKZNT40z3nqTAX^?6*j{yeq; ze;@U>&-nP5j>fKMmdfyYJ5Aj@|1?`~Nz8`|rMc(cMs7P1=9V_WH-+GLk9#4=#Qc zXDSE2S$VEq1Lv#0rjbl&CY{YMtRidLt<*!@3M4#$2!^HT0~ zNA5qN_*JMH1xD^aHt%+RC+qfN-2Rh_U&WwMVATGf+H}VE&f28C-kAL-7rzQNNP#i? zkI%Wg!b`j9YWvfj$gO5p*-0pV6^Ece-`3@gPIIL-IHw{bNf(BIE?e}ug5kM587yKBFHC$=9@{OUgY)BbjQBSR?A zjd6(A;rq)^1c3^4w;xhfzQx+hHZ<^}>whl*fquxv-dK(5kVksH z?FAMZ=%)b3HO6Ceha1{%f2@v{cj{Dt2dj2i@momu_X>{a6cFeKSMLut34PkP1xLDB zwiFQC?}k;sePbJlmta8qYrx&O+|{sz+GW9P<)DDyt*$B1`e}MYGCFH!4~lnx`#J!L ze&se^gHiiS?5j;m3WWEM=hUVje-8>J@77loR04?9pp#Jqt={b&3;a~Pey`UvZ(=`K zok+b^-U*~Y(5C~>k?Tsbd)Kk#%P^DxdTKCq|3TZ2ufbV&e+{Vt*mD^a2o%pEEd?ks zi(_t&Uf!HqC4jJNcEzn%@U}Z@dlvya6Ky~TXJSf70VA+y7!(NhYcOE{vB{S)C;{x% zK&HR1z)9N=tw8|VZjk~L%8(i8o>qaNQ-eMD#e4SD+T(uB4L!tc>u;*CXteTyu!! z>aMr&Xm?KVN))m?=d5(w9rLeXCxCoJx_#gSe87*cCj2Yt1NwkId_{Eo&7Kp$OA_*c-!WzffN>({jHZzwtX zYKOYL%DVflJKA2|t0w%~j&yr>EBi%vw7t4s+0WaNZttYBcL)8e(*9R}q}xBE32Jyn zahL2p|Dsj?YuI_$r+-xjxb;W6eL}b=yrMYU>FAQHd%fY6|73d6-LiY-5Z-o2x>qj1 z?tr}N56=bIgD&~H8?*PqLjax2ko;>`fZh%6#_{jlpsa7t2F`u&24`f~H>mloZg96; zt~2PYvTGaE?p26t_nizj+ZJAS?`PoI8~6SOC+E%j#=XCRXK&qm8(hEO^`3iggIkSS zJ@?)Qt=)IuZqV?t7eaNlgecHzF+fb}Td^9Hqj&wagt z)AN=9+;d-V;MSd!ecyd$sOxa;bxBR<43O&w=DK=#Wt z?xX4Fm1`V$(!EF*&FMHhG@BnqFMr^<(b1=Ni!(Qi$2-5i@S+`WXH%~lcXF(qpM9$A zZVTtgojld$cQ2Zb(>1BLzUJS7a2r$$DuY{II;3HDHk8K!jhvM~OI^la4p%?m_G|fD zo#hWwm(f=yx77Khy=ouz3OZV<1EzA#!=*3UsqsoM6=C;rv%N*_Zzt#XsNMbjKT(P3edg4??z?A0%^RDZYQjLwhp^r+677tVpJms?NYs&j`1{z%vLrQ-t?mdfh7)z>Y$ zcD~)$g=6a+uXCq{t)nvSRo;?qw!7WG{BcJ-zwKV9?!`Rcx_Q(Xj_3Przn>WSVw{MGg@7@*f-@h*|E-s1>A3hX6|Mao=<(FUBGg=@31Xh4R zdA=!e-nndFN}k&AWlR5#mZ&n0{4W^-N}aXgOP2i|@L#KRcpUY=WC(=Itd3r??4f_P z(qRMYf5{LCmsuUXWZ6UiYNf*l)c=wp5H7PiDzo3L>`TU%*D4(zm-umgWSgsA>^GM`89(YD zuCq2O@#Ff)HdnpaZ!Ui_e$-#9ba-6i$MunIu6nWGT>fPIsDHT5+Ni{j>m%D-^GJe!wt8{o=;>Y!oZLWH;-(3D={HTAp&f2KNkLx4bT=inVx%|oa zQGcz{;ccxI@`IGUZ{^2@nqY^)^k8E?*i~Z*EC*w!`wMvJ_C4O8V+2*Pj z`_1J~#*g}k>#U7R{J1`{%~dbUl>L0GNHY)Ms z`p7m{z1VLqe=>g5U#oO@T;j*|k!`MevEN+&Wc;XqxX#+B#E2bflMQk@2JcN}-iuiQh7-tVbo|NBxyTE5i~$4e4C}Uc>%# z`IGTm)jwCf$iG4$7oMoUKtR#CHY`@F|NfDyUf@6YPYC4VljJYXe@*G(afu)6Q?|M4 z#eQ@7lkube;W}%h5GJe!w zt8{o=;>Y!oZLWH;-(3D={HTAp&f2KNkLx4bT=inVx%|oaQGcz{;ccxI@ z`IGUZ{^2@nqY^)^k8E?*i~Z*EC*w!`wMvJ_C4O8V+2*Pj`_1J~#*g}k>#U7R{J1`{ z%~dbUl>L0GNHY)Ms`p7m{z1VLqe=>g5U#oO@ zT;j*|k!`MevEN+&Wc;XqxX#+B#EhwH43O8mG!vdvX5 z_M6L}j34#aDjgn|_;G#K(#rU)>c3PxkiS46OmlTqtX6;i9ra%(0LE^W} zD(g|n_)-60nbkpwpN{l0Ei!)8UoCaeAn{vfmG!7({HTAh%<7=TPe*#078yV4ua-J! zkoYaL%6e2Xe$+o$W_3{Frz5>gi;N%jS4$lK+QC47?5*2W!~aXqd+)Kb+k<`-kZDllPI8O8aBkU z<{5`5{sany(^N+}yJ&lu;*Y0*nrYY&&AXa#xZ;ncKse3#XfF`S#Xm`XP!Rc07|$;< zqc8mo#lLx@s$;_U{ttzb^djcI?C&HOf3vxE=g#jEQm>ZUQJ^pV48`AExpn8xt>pYS z8ygDrWuK$?b=;q40KkF*ed*^Y{$_JhZgD&H2rTi-O@Y4b^Avxxxmj(JegqN%c`4AB zexBl&hhMc#`Vp9!0)5%%Dt>wRRU73v0&`NJFa2D_?;P4Wj=*db=*vD^@%iwpHp_Da z=Al4e`uU3A9Ddbyd5*vg6zI!7WAVMiui7!w5tvGWzVvez-#h%OEpr`#NfhYIK5Owi zhhMd8wj*#l1^Uv@TKw+eS8bc`2%JcPzU=SZx&38Eg^I(k+BxG9=uVd}`_tL~X^_Z# zXTJ4$mK${{kNeoW|CJ5klP}!I%Gg);gMVyxZNGW_O3ALoZ}hQu|0~ZCc;))g9~AKr z*bhb<$)W@0vs#8DFv@#BuNDA*G}=$rLG`hBf1lJNa1igkZQJ~d!W$mYP18aBv3Gx; zlp}CB@9Ta2?92XsJUt@`ItU(q)mD>_z)`$+d+jA(4fG_uZ;TO*Tj&}qep7%)*v^oeKewAy# z^mU()z=iNW34%%o;lob@pgaPX#QP)!NC)A=Ps{(#=gZ@L5(KvcBySz=8$n6TvXFuTRl4ipG+U1Ni zLH2h-0r#(Htf8fg8fzl$>4XCAnckQ}>lQfH#H)0|AuE%c;qamvQ=7r? zngx$Gk?(c1p!X&=1KNs(k2mpmI(pEZY0ZT`fBBXs39q9^?M-UB`s|fhnoR0WU)W>j z_W2oZ+wFGxQ$A7bajZX2GlA@a~y*jyBqb@!WQzgJE8RkPo%>=&B- zdSyS?>?f67GuHwBRkxp!12w#&xJ&kr`ubaBKiBPLfLq;82=|0n9^fjv3GdqNP!*c=lpi7?b#_YZD5J2aB0lEV8Zg4k_f8PdWeS0==?t3>l zBfGvq&2M#syXA77L1&d++n{!@LR7o&WU$$`aI7F;J?R)O)4V<301mK?gdIPuaob3DVD?@D$xUV*F=gEaz9&lf6P}@W9%MILl zK73d_dGe%q`t)h>?Af#8`Sa(+%a<>U*RNj}Z{EBq-oAZXynFYqc>n%=adB}`eE9I8 z`1z-g#V^17QvCX>D&=YedPpFY1seDLkEFXy{!_x0J{ z-zB{AS!HqGJLf-*-n=Tk()HDw^$IzE-+8s1x9HCAI=_C+->TYz=YLK6b)8@N>Z?vB z)fQiuE6V7;@ZGsTqv{-VN4_Yhxdo;7+qb{^%=@dASIOvIpM3UJIsJCEL%rli^H&~k zkoC)YgDcm|%iHzjGNyXP?Jvq-SifF5D^vbm6-Z~czr@9L#clqz^YGOb5l1=C`^Kp_ z_eJ5p)rG2p_U5%+j*CXBp!}%Yd0vl}lpdRoXDo{HlgnMSV{y136t5S>IkhK6v8C31 zp8QDdt)eKO7u<6X(zb5cJ#5>3+-z@A``gL+J!*G<|4(%LNuN_s-Rr)4HJ?+jx(oga zd`^Az=+WM1)mN`xsh?HxIhDag3k24OK>azjKJWugl~TY^53#-bmdaOrCvp2Wk96Bn z_Uf*f95lVo`et;Y_HOFsRVV&b`_l7|#h03Y?|P!Ef1k;>uFPL&7Pp1f-Ed=X7B~O> zwbDgt?<~H-cYm7=xo{KQ_xg6vg?R1u?dDGvl{b9kfo`Cx+fKT}`-(C-`J8Svn;W+B z_RQU8mQj6n<$8HT*I3Ia$|FKB@P5LhV!)qTnh?~4-g z{^;F}>iWws-RVo;23|Ms8TEX5o#^kz4SJT~9s}H{{L_d2YwpAT@4l$6Z@B*F?r%3< zt*(n3H?Cc~dGp$}YPw75CiQOIxJlWayU&7CUKj4Ocj)>b z2&*CM@9y6{Kx%2_`hcUAA9W3KkomJT?5CQKlBg%A2a`tJ$L9I`agCJ9CQBAKlFdh z{6F^Gp?~QA*fns>`9uHE|1tCb*mH;eq5osoz%l0!{X_r9%>QH09r}m|JZYf{-OV4*T6C7 z5B)>`$ISm@&mH=Q{*PS)$DBX(5B(oA|BpR)=zrPz|M{nnyEVTKt*

N3mPu2mM3; zmKw3j9OIw0-7>d1d|TrK z{X_qjJhtX<%)e!BbNG(smuiRpp?^yrr}8s(y=885_)g6~wjTP2{w;YNSe5YKQ)ze@h;x@-ub4Wo~o$PR&2I9{Pv=EqNT{pS9gG zw>f-U;{*Le|CT(q=5NfuWo~o$j^&qXhyI~|OCG24Gj+XXZgcof%|Est`iK54c^u=P zwcRqeIec5=1N}q)mOQrRZ_K}CZgcpK<(F!Q{-J+M9;fm%b-iV7bNEipKeitFhyE>j z9OIw0-7>d1d|TrK{X_qjJhtX<%)e!BbNG(smuiRpp?^yrr}8s(y=885_)g6~wjTP2 z{w;YNSe5YKQ)ze@h;x@-ub4Wo~o$PR&2I z9{Pv=EqNT{pS9gGw>f-U;{*Le|CT(q=5NfuWo~o$j^&qXhyI~|OCG24Gj+XXZgcof z%|Est`iK54c^u=PwcRqeIec5=1N}q)mOQrRZ_K}CZgcpK<(F!Q{-J+M9;fm%b-iV7 zbNEipKeitFhyE>j9OIw0-7>d1d|TrK{X_qjJhtX<%)e!BbNG(smuiRpp?^yrr}8s( zy=885_)g6~wjTP2{w;YNSe5YKQ)ze@h;x z@-ub4Wo~o$PR&2I9{Pv=EqNT{pS9gGw>f-U;{*Le|CT(q=5NfuWo~o$j^&qXhyI~| zOCG24Gj+XXZgcof%|Est`iK54c^u=PwcRqeIec5=1N}q)mOQrRZ_K}CZgcpK<(F!Q z{-J+M9;fm%b-iV7bNEipKeitFhyE>j9OIw0-7>d1d|TrK{X_qjJhtX<%)e!BbNG(s zmuiRpp?^yrr}8s(y=885_)g6~wjTP2{w;YNSe5YKQ)ze@h;x@-ub4Wo~o$PR&2I9{Pv=EqNT{pS9gGw>f-U;{*Le|CT(q=5Nfu zWo~o$j^&qXhyI~|OCG24Gj+XXZgcof%|Est`d_yGWA%gm!44Qq#{l|={-K}g`dK@6 z&_DFQb`B%{>E{>p5B)f9)Jb{L{}b=pXurex~bZ?bt#8(Er*wjQFRY zU(i4F5B*Hn&)Ttr{-OW1a~SbYKfj=V=pXu-uAjAI2mM3;Yv(ZHpMHKp|Ik15GhIJx z#}4|3{@2c7#6SJ~g8rd@=x4fq){Y(Y5B;y5!-#+S`33z$|Ip8L{j423=pXuDJBJbf z^z#e)hyJ0T>H1kacF;fczjh8I{^{oz^bh?*KhyQIcI=>k=zr}TM*P#yFX$iohkmB( zXYJTQ|Iq*1IgI$HpI^{F^bh?^*U#FqgZ`JT|2h5}6P9}%S|66V&EeY`KjWBx63o5Oc3zf?Q)5B*#6IF+BN>n(Ge!*^=_vGveD^l!=I82_y8mbuO0+ZrF} zANsfCu{D2V{w;Hx!*?vdR6Fz!{af-lm7l5WEpwa0cWVBz_0T``Z^`2r|E%qnxy|9* z8XxE%`nTkSLRtnHS$ z&EeY`ALt+Yx8$)ke`EeFbDP6=EWcDc^bh@8@;H^Bsp~Cso5Oc%{;~DYKlE?O;~4*} z?UuRC;oBM?=pXvGWBx63o5Oc3zf?Q)5B*#6IF+BN>n(Ge!*^=_vGveD^l!=I z82_y8mbuO0+ZrF}ANsfCu{D2V{w;Hx!*?vdR6Fz!{af-lm7l5WEpwa0cWVBz_0T`` zZ^`2r|E%qnxy|9*8XxE%`nTkSLRtnHS$&EeY`ALt+Yx8$)ke`EeFbDP6=EWcDc^bh@8@;H^Bsp~Cso5Oc% z{;~DYKlE?O;~4*}?UuRC;oBM?=pXvGWBx63o5Oc3zf?Q)5B*#6IF+BN>n(Ge z!*^=_vGveD^l!=I82_y8mbuO0+ZrF}ANsfCu{D2V{w;Hx!*?vdR6Fz!{af-lm7l5W zEpwa0cWVBz_0T``Z^`2r|E%qnxy|9*8XxE%`nTkSLRtnHS$&EeY`ALt+Yx8$)ke`EeFbDP6=EWcDc^bh@8 z@;H^Bsp~Cso5Oc%{;~DYKlE?O;~4*}?UuRC;oBM?=pXvGWBx63o5Oc3zf?Q) z5B*#6IF+BN>n(Ge!*^=_vGveD^l!=I82_y8mbuO0+ZrF}ANsfCu{D2V{w;Hx!*?vd zR6Fz!{af-lm7l5WEpwa0cWVBz_0T``Z^`2r|E%qnxy|9*8XxE%`nTku2rQLI2SI+BuB)r=MTY zKlBg%OxMrav4j4h|Fv@%@lQX$pnvEe`kAhuwPOeUL;q{%FyfznenJ1xKlC$QKWoPh z`iK74&SAtq{rrOdp?~OSx_;J<9rT~3{~Y)o!pFOJ?{<$KJ;LA4e~_mACr_U2-oJmp zJ46kavS+d4uccr(R~#QceAvBw`4YNM)V+M)fA#9s(VhV-mVYsq?v}6*-t*Jm>!s%9 z^|9UyK>y4B41xE2TiwfZ;Mnd3p#SCSAMg3|YM;-7W4afB{+FkJyyqWA_pE@#_Im;7e?I-=J^ylP zpU;3b-wQzh_WH+r{^is?>z~^--U~qgw))3={&8rZ&w#bv3qb!i`p0|zap|7*&+S_7 z1=g(pA+aCgclYp~|DgQ)1jqh23J!TMFhm=dea_t4$9sPJo=<1s+qZA=w+h_fDmc`= zz-8CBmfzgEr~UAr-)jHavuDlU(|G#yDb4_Q2H;*mQ)}MwxwVh?{8sn$+4teYhr5f5 zi$?#{=g-7waW9Zp?X9=Db&vP_uI^dep?h5#V>?>h3$&`u)0x1@jh%ulNYo(1;fhk7a=%}FhqLC)ai}l6=f`6L!S9*^}@5j;aDHry@19Ut8u*N59cDk z?+<@*1+3y83u2_!aJ%2n8=?uuhMe@Pt3EE+GxUBaAmKqQF#(VxSzJ+u- z_L*M@e;UKH!09!}asFy`=^M}euK;~}S=xwuZ{EDw;dAJC4o-RIr_~bA0>|S|&s~VS z8m4oM=Qs!Eh;zsu^jVb7Q~Zp2oQo;X{Ipu&436VY+g+Ppj)OJPTao{k>nW6s^bB`unVb|eN5*uyT*^Dk6*UW2bRzLv|3)4XMwoCkEwi^UE|4;$1lU@1A5Oo z1jcKB7Kr=%VY;3&>kxcQ-E*y<59WC0r(wIcXMwoCpQ7gJYc$?0eS9sS59WO4r`2rf z&jN9OKV82$S8DuO^7xWJAI$yCPpi{Xp9SLnKBs!~`qH?xEnm~d~m2|ep+1)`799k_tq+%$G^s{C66EK^T8pX`Dyi-`&l6F@8{9w zA$HL?w&d}-J|8UMnV(h%>t}(uzdwW;54Werv!#z)eLl$j%#SOZ3r~w@fw;ftDjj#5 zi=%V;$^H2t_cK3cR8CBCJqyJBJy!>*i*Rsz>k5Xi~jxqJ=%e31K@pN4PFykpM-aeuE>0pqC% zH=R?qx2jC181dKQTLdkuArTOg2&%X9njKOa~<^V9IonJdMP`+E&(jL(Tc zPF~ODi#{LZ+-oS_x%SK*f3CQO_!){7=B*EbA@#qEbB0#xGUh%cr=j>@-sM1G2q!Mf zoUs+VEO`&fV=Ok9fB6s?!jrYmnOd#2<~t ziNFv}EqzXE<(8h`koZzDzQS02)jWz0i-%Xn}N1eT1z5KddnvBJb6)*(Kv@_}C7_yx1>{z;3q-8))>*Sz!l08Uo-4^nvq1QwPpZoDVo3a6aIC&=A1+fb#+8 zgQgDLKj3`8`GE5Q=Yxg-&IgxCidO^ zoX7nkKkKokIkB95JMu^U*Tn51vHJXu^+WuB@ZiC2O)rT_EN9=2{P*?0rrJ}isQ)h= z419ja`rtqKFZHA8|L31R?#8?{KRiCh7tQ5$vX$}2IPcrX@IP0)9Dgo<$bX*mFIT-# z|LXoS7oOlh`0sPTKi^}0od3h`e{$&+=O4~L;y^Aw`P!#`O!K}S`X8=;*6q^Tx$3{P zyg44^KhOOS5g?GJc=m zu|D_@{!9KaKiAUA_+y;+?PK`AR6LMBKL7h1@cA99?c29W`7>4#E>JGFIlsQv%`>ez$NTKrvxZYopFYikK?)ZL zANMk^IpzQG;ltg<#YK}p^%<8O?N~1K)!f<2IN!W^v&&VdP<**GMKMyW9JkVT&ILDz z-tWG5FBlq2POU!DVQj5P4ry?$`7V4VIq zonOzNKQH+_l()3T_u==)oQ0$z+Plx6@7wh$C(3Q;Ie6;kZr$rg_flgf8`W-zKKwIJ z^BL0^^PBe6e0bv&JLPaHYdz-Lt-tSH-@DgjeaJJ<`J(uLs9)4CU!k**G?RnhV{#77 zbumuX2gT1hdhNHaPp^)R=34VRl;4;!7xO56$Q<4E3*L|VzMZ%|C%-w4sjZ8Bus-TM zNk`2&M1A*)YRg;uz3bnf8n4y5I*-S${h^Mv!)tHsv5djlXq`5n#>pqmX>gN1mUQjn zJawy`GEs;Dp4)x#BIIHV%_hVJyTjy1K zvaMSFdnB8S>iT;9_c`uWe+R?;J&e-e{w~FDg`4aCKE!Uj+0x(T**0VH92cG8vmi6AFSpHE+GDy|K0=e z@BV#_p+5&A^)Pi^Zv3alF?Ai{2Y*Nl;7|FUp8Wnb700RTpkL^BN&1!VtJc@K`EMPs z^pE(v`jz-tU+2bu>N!4j9pdluXDW_U*8zXvPiGYPgZt+c9)Lf2_+x#)ApPe)|D}KH zYsBAu|FXtg`cK7QtZ)7;;`Qs-qkg_f#>Ln4^AzMu+eeI#etsg>mp_XY`&k~2ZA?o( z2mG8@QvA6v*YX-ri)j1~@89Rb{N>A+<%7LSr@6Fe&(As$))ez8)5-OTKabt(2lwji&DZp^`NZiMA40!R zLqAX1mp}O=-=VdzAZ z9|}j<55+*SG+1+-Lt3})zI%P|UQHaX&%VnVGrtH!QFGdtUgdnU(VP+dxIZMuA#+>| zQGSWoeNBbA@UyegPZr5)(nYh>Ky0))V&DTCN9@6bda}&%5qFI7Zj*+wOeh{zE>l{dKdwOYQFDoc`lS^mAIL?seb2nxE5( zsK?_0^TDKbAqBsdvcG&U$aT&61(SD!Y|piy^uzwww7>RzNai+V-jw`@_@!8e%)|cG z`^*^r4Z-y?<1cxhay^BADf`K_Yux|X`G@?&|GgT??IAc#;r|f76w8o#Q}&m6rd(tH zVefy86Srgkb^<*I=zHE0d;jHqsiog7oLX~Q>-*wwEX=)W==#>KEDR#n*mIYiRBLf!nFmoR3g_ zzUKw?KD_r2?)ovUVS8VD;r`?2)~|E-0?WAKjA<_j_w+yTALp^7qLo&{Ox~ z=M?v^x(nsY<;8gpYNZ=mFS)8+(_C%6|9;Es<=B$fbIg5hU;KUR*w(jRVnu7@*pk - - - - Blazor - Provides Visual Studio support for Blazor - Content\LICENSE.txt - Microsoft.VisualStudio.BlazorExtension - https://go.microsoft.com/fwlink/?linkid=870449 - https://go.microsoft.com/fwlink/?linkid=870448 - Content\WebConfiguration.png - Content\WebConfiguration.png - - - - - - - - - - - - - diff --git a/src/Components/Components.sln b/src/Components/Components.sln index 3c448f8604..f00b28bd36 100644 --- a/src/Components/Components.sln +++ b/src/Components/Components.sln @@ -201,8 +201,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Ne EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.JsonPatch", "..\Features\JsonPatch\src\Microsoft.AspNetCore.JsonPatch.csproj", "{DC47C40A-FC38-44E4-94A4-ADE794E76309}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.VisualStudio.BlazorExtension", "blazor\BlazorExtension\src\Microsoft.VisualStudio.BlazorExtension.csproj", "{9088E4E4-B855-457F-AE9E-D86709A5E1F4}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BB236B66-28C0-49DD-9CD4-C4673CD4E7B4}" ProjectSection(SolutionItems) = preProject ..\..\.editorconfig = ..\..\.editorconfig @@ -1328,18 +1326,6 @@ Global {DC47C40A-FC38-44E4-94A4-ADE794E76309}.Release|x64.Build.0 = Release|Any CPU {DC47C40A-FC38-44E4-94A4-ADE794E76309}.Release|x86.ActiveCfg = Release|Any CPU {DC47C40A-FC38-44E4-94A4-ADE794E76309}.Release|x86.Build.0 = Release|Any CPU - {9088E4E4-B855-457F-AE9E-D86709A5E1F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9088E4E4-B855-457F-AE9E-D86709A5E1F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9088E4E4-B855-457F-AE9E-D86709A5E1F4}.Debug|x64.ActiveCfg = Debug|Any CPU - {9088E4E4-B855-457F-AE9E-D86709A5E1F4}.Debug|x64.Build.0 = Debug|Any CPU - {9088E4E4-B855-457F-AE9E-D86709A5E1F4}.Debug|x86.ActiveCfg = Debug|Any CPU - {9088E4E4-B855-457F-AE9E-D86709A5E1F4}.Debug|x86.Build.0 = Debug|Any CPU - {9088E4E4-B855-457F-AE9E-D86709A5E1F4}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {9088E4E4-B855-457F-AE9E-D86709A5E1F4}.Release|Any CPU.Build.0 = Debug|Any CPU - {9088E4E4-B855-457F-AE9E-D86709A5E1F4}.Release|x64.ActiveCfg = Debug|Any CPU - {9088E4E4-B855-457F-AE9E-D86709A5E1F4}.Release|x64.Build.0 = Debug|Any CPU - {9088E4E4-B855-457F-AE9E-D86709A5E1F4}.Release|x86.ActiveCfg = Debug|Any CPU - {9088E4E4-B855-457F-AE9E-D86709A5E1F4}.Release|x86.Build.0 = Debug|Any CPU {ED210157-461B-45BB-9D86-B81A62792C30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ED210157-461B-45BB-9D86-B81A62792C30}.Debug|Any CPU.Build.0 = Debug|Any CPU {ED210157-461B-45BB-9D86-B81A62792C30}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1593,7 +1579,6 @@ Global {3FAF725B-A628-4531-9F61-499660CD4347} = {2FC10057-7A0A-4E34-8302-879925BC0102} {04262990-929C-42BF-85A9-21C25FA95617} = {2FC10057-7A0A-4E34-8302-879925BC0102} {DC47C40A-FC38-44E4-94A4-ADE794E76309} = {2FC10057-7A0A-4E34-8302-879925BC0102} - {9088E4E4-B855-457F-AE9E-D86709A5E1F4} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {ED210157-461B-45BB-9D86-B81A62792C30} = {2FC10057-7A0A-4E34-8302-879925BC0102} {DA137BD4-F7F1-4D53-855F-5EC40CEA36B0} = {2FC10057-7A0A-4E34-8302-879925BC0102} {0CDAB70B-71DC-43BE-ACB7-AD2EE3541FFB} = {2FC10057-7A0A-4E34-8302-879925BC0102} diff --git a/src/Components/ComponentsNoDeps.slnf b/src/Components/ComponentsNoDeps.slnf index 497332bacd..f41ac99b30 100644 --- a/src/Components/ComponentsNoDeps.slnf +++ b/src/Components/ComponentsNoDeps.slnf @@ -30,7 +30,6 @@ "Components\\test\\Microsoft.AspNetCore.Components.Tests.csproj", "Server\\src\\Microsoft.AspNetCore.Components.Server.csproj", "Server\\test\\Microsoft.AspNetCore.Components.Server.Tests.csproj", - "blazor\\BlazorExtension\\src\\Microsoft.VisualStudio.BlazorExtension.csproj", "test\\E2ETest\\Microsoft.AspNetCore.Components.E2ETests.csproj", "test\\testassets\\BasicTestApp\\BasicTestApp.csproj", "test\\testassets\\ComponentsApp.App\\ComponentsApp.App.csproj", From 1f4341a2485085b5b5e4d326bb2b6bafa9c5ae94 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Fri, 9 Aug 2019 15:44:22 -0700 Subject: [PATCH 17/24] Add 'firstTime' parameter to OnAfterRender Fixes: #11610 I took the approach here of building this into `ComponentBase` instead of `IHandleAfterRender` - *because* my reasoning is that `firstTime` is an opinionated construct. There's nothing fundamental about `firstTime` that requires tracking by the rendering, it's simply an opinion that it's going to be useful for component authors, and reinforces a common technique. Feedback on this is welcome. --- .../Pages/Index.razor | 2 +- .../Pages/Json.razor | 2 +- .../Pages/RenderList.razor | 2 +- ...oft.AspNetCore.Components.netcoreapp3.0.cs | 4 +- ...ft.AspNetCore.Components.netstandard2.0.cs | 4 +- .../Components/src/ComponentBase.cs | 32 ++++- .../Components/test/ComponentBaseTest.cs | 128 ++++++++++++++++++ .../Components/test/RendererTest.cs | 2 +- .../AfterRenderInteropComponent.razor | 2 +- .../InteropOnInitializationComponent.razor | 12 +- .../PrerenderedToInteractiveTransition.razor | 7 +- .../HtmlHelperComponentExtensionsTests.cs | 2 +- 12 files changed, 170 insertions(+), 29 deletions(-) diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/Index.razor b/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/Index.razor index 7509137e37..e740dc121c 100644 --- a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/Index.razor +++ b/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/Index.razor @@ -4,7 +4,7 @@ Hello, world! @code { - protected override void OnAfterRender() + protected override void OnAfterRender(bool firstRender) { BenchmarkEvent.Send(JSRuntime, "Rendered index.cshtml"); } diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/Json.razor b/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/Json.razor index e8dded3721..84722da2f1 100644 --- a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/Json.razor +++ b/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/Json.razor @@ -37,7 +37,7 @@ largeOrgChartJson = JsonSerializer.Serialize(largeOrgChart); } - protected override void OnAfterRender() + protected override void OnAfterRender(bool firstRender) { BenchmarkEvent.Send(JSRuntime, "Finished JSON processing"); } diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/RenderList.razor b/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/RenderList.razor index 062d3d69fd..95fcb40963 100644 --- a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/RenderList.razor +++ b/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/RenderList.razor @@ -46,7 +46,7 @@ Number of items: show = true; } - protected override void OnAfterRender() + protected override void OnAfterRender(bool firstRender) { BenchmarkEvent.Send(JSRuntime, "Finished rendering list"); } diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs index 39e576ab5f..468bea98e9 100644 --- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs @@ -84,8 +84,8 @@ namespace Microsoft.AspNetCore.Components void Microsoft.AspNetCore.Components.IComponent.Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() { throw null; } System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, object arg) { throw null; } - protected virtual void OnAfterRender() { } - protected virtual System.Threading.Tasks.Task OnAfterRenderAsync() { throw null; } + protected virtual void OnAfterRender(bool firstRender) { } + protected virtual System.Threading.Tasks.Task OnAfterRenderAsync(bool firstRender) { throw null; } protected virtual void OnInitialized() { } protected virtual System.Threading.Tasks.Task OnInitializedAsync() { throw null; } protected virtual void OnParametersSet() { } diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs index 39e576ab5f..468bea98e9 100644 --- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs @@ -84,8 +84,8 @@ namespace Microsoft.AspNetCore.Components void Microsoft.AspNetCore.Components.IComponent.Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { } System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() { throw null; } System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, object arg) { throw null; } - protected virtual void OnAfterRender() { } - protected virtual System.Threading.Tasks.Task OnAfterRenderAsync() { throw null; } + protected virtual void OnAfterRender(bool firstRender) { } + protected virtual System.Threading.Tasks.Task OnAfterRenderAsync(bool firstRender) { throw null; } protected virtual void OnInitialized() { } protected virtual System.Threading.Tasks.Task OnInitializedAsync() { throw null; } protected virtual void OnParametersSet() { } diff --git a/src/Components/Components/src/ComponentBase.cs b/src/Components/Components/src/ComponentBase.cs index 018c016975..51c95f386b 100644 --- a/src/Components/Components/src/ComponentBase.cs +++ b/src/Components/Components/src/ComponentBase.cs @@ -30,6 +30,7 @@ namespace Microsoft.AspNetCore.Components private bool _initialized; private bool _hasNeverRendered = true; private bool _hasPendingQueuedRender; + private bool _hasCalledOnAfterRender; ///

/// Constructs an instance of . @@ -129,7 +130,17 @@ namespace Microsoft.AspNetCore.Components /// /// Method invoked after each time the component has been rendered. /// - protected virtual void OnAfterRender() + /// + /// Set to true if this is the first time has been invoked + /// on this component instance; otherwise false. + /// + /// + /// The and lifecycle methods + /// are useful for performing interop, or interacting with values recieved from @ref. + /// Use the parameter to ensure that initialization work is only performed + /// once. + /// + protected virtual void OnAfterRender(bool firstRender) { } @@ -138,8 +149,18 @@ namespace Microsoft.AspNetCore.Components /// not automatically re-render after the completion of any returned , because /// that would cause an infinite render loop. /// + /// + /// Set to true if this is the first time has been invoked + /// on this component instance; otherwise false. + /// /// A representing any asynchronous operation. - protected virtual Task OnAfterRenderAsync() + /// + /// The and lifecycle methods + /// are useful for performing interop, or interacting with values recieved from @ref. + /// Use the parameter to ensure that initialization work is only performed + /// once. + /// + protected virtual Task OnAfterRenderAsync(bool firstRender) => Task.CompletedTask; /// @@ -298,9 +319,12 @@ namespace Microsoft.AspNetCore.Components Task IHandleAfterRender.OnAfterRenderAsync() { - OnAfterRender(); + var firstRender = !_hasCalledOnAfterRender; + _hasCalledOnAfterRender |= true; - return OnAfterRenderAsync(); + OnAfterRender(firstRender); + + return OnAfterRenderAsync(firstRender); // Note that we don't call StateHasChanged to trigger a render after // handling this, because that would be an infinite loop. The only diff --git a/src/Components/Components/test/ComponentBaseTest.cs b/src/Components/Components/test/ComponentBaseTest.cs index 1f9ab22826..bd09cc49c5 100644 --- a/src/Components/Components/test/ComponentBaseTest.cs +++ b/src/Components/Components/test/ComponentBaseTest.cs @@ -3,6 +3,8 @@ using System; using System.Diagnostics; +using System.Reflection.Metadata.Ecma335; +using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Components.Rendering; @@ -261,6 +263,98 @@ namespace Microsoft.AspNetCore.Components.Test Assert.Equal(2, renderer.Batches.Count); } + [Fact] + public async Task RunsOnAfterRender_AfterRenderingCompletes() + { + // Arrange + var renderer = new TestRenderer(); + var component = new TestComponent() { Counter = 1 }; + + var onAfterRenderCompleted = false; + component.OnAfterRenderLogic = (c, firstRender) => + { + Assert.True(firstRender); + Assert.Single(renderer.Batches); + onAfterRenderCompleted = true; + }; + + // Act + var componentId = renderer.AssignRootComponentId(component); + var renderTask = renderer.RenderRootComponentAsync(componentId); + + // Assert + await renderTask; + Assert.True(onAfterRenderCompleted); + + // Component should not be rendered again. OnAfterRender doesn't do that. + Assert.Single(renderer.Batches); + + // Act: Render again! + onAfterRenderCompleted = false; + component.OnAfterRenderLogic = (c, firstRender) => + { + Assert.False(firstRender); + Assert.Equal(2, renderer.Batches.Count); + onAfterRenderCompleted = true; + }; + + renderTask = renderer.RenderRootComponentAsync(componentId); + + // Assert + Assert.True(onAfterRenderCompleted); + Assert.Equal(2, renderer.Batches.Count); + await renderTask; + } + + [Fact] + public async Task RunsOnAfterRenderAsync_AfterRenderingCompletes() + { + // Arrange + var renderer = new TestRenderer(); + var component = new TestComponent() { Counter = 1 }; + + var onAfterRenderCompleted = false; + var tcs = new TaskCompletionSource(); + component.OnAfterRenderAsyncLogic = async (c, firstRender) => + { + Assert.True(firstRender); + Assert.Single(renderer.Batches); + onAfterRenderCompleted = true; + await tcs.Task; + }; + + // Act + var componentId = renderer.AssignRootComponentId(component); + var renderTask = renderer.RenderRootComponentAsync(componentId); + + // Assert + tcs.SetResult(null); + await renderTask; + Assert.True(onAfterRenderCompleted); + + // Component should not be rendered again. OnAfterRenderAsync doesn't do that. + Assert.Single(renderer.Batches); + + // Act: Render again! + onAfterRenderCompleted = false; + tcs = new TaskCompletionSource(); + component.OnAfterRenderAsyncLogic = async (c, firstRender) => + { + Assert.False(firstRender); + Assert.Equal(2, renderer.Batches.Count); + onAfterRenderCompleted = true; + await tcs.Task; + }; + + renderTask = renderer.RenderRootComponentAsync(componentId); + + // Assert + tcs.SetResult(null); + await renderTask; + Assert.True(onAfterRenderCompleted); + Assert.Equal(2, renderer.Batches.Count); + } + [Fact] public async Task DoesNotRenderAfterOnInitAsyncTaskIsCancelledUsingCancellationToken() { @@ -386,6 +480,10 @@ namespace Microsoft.AspNetCore.Components.Test public bool RunsBaseOnParametersSetAsync { get; set; } = true; + public bool RunsBaseOnAfterRender { get; set; } = true; + + public bool RunsBaseOnAfterRenderAsync { get; set; } = true; + public Action OnInitLogic { get; set; } public Func OnInitAsyncLogic { get; set; } @@ -394,6 +492,10 @@ namespace Microsoft.AspNetCore.Components.Test public Func OnParametersSetAsyncLogic { get; set; } + public Action OnAfterRenderLogic { get; set; } + + public Func OnAfterRenderAsyncLogic { get; set; } + public int Counter { get; set; } protected override void BuildRenderTree(RenderTreeBuilder builder) @@ -448,6 +550,32 @@ namespace Microsoft.AspNetCore.Components.Test await OnParametersSetAsyncLogic(this); } } + + protected override void OnAfterRender(bool firstRender) + { + if (RunsBaseOnAfterRender) + { + base.OnAfterRender(firstRender); + } + + if (OnAfterRenderLogic != null) + { + OnAfterRenderLogic(this, firstRender); + } + } + + protected override async Task OnAfterRenderAsync(bool firstRender) + { + if (RunsBaseOnAfterRenderAsync) + { + await base.OnAfterRenderAsync(firstRender); + } + + if (OnAfterRenderAsyncLogic != null) + { + await OnAfterRenderAsyncLogic(this, firstRender); + } + } } } } diff --git a/src/Components/Components/test/RendererTest.cs b/src/Components/Components/test/RendererTest.cs index 677b9fb952..fbd91decf7 100644 --- a/src/Components/Components/test/RendererTest.cs +++ b/src/Components/Components/test/RendererTest.cs @@ -4244,7 +4244,7 @@ namespace Microsoft.AspNetCore.Components.Test renderFactory(this)(builder); } - protected override async Task OnAfterRenderAsync() + protected override async Task OnAfterRenderAsync(bool firstRender) { if (TryGetEntry(EventType.OnAfterRenderAsyncSync, out var entrySync)) { diff --git a/src/Components/test/testassets/BasicTestApp/AfterRenderInteropComponent.razor b/src/Components/test/testassets/BasicTestApp/AfterRenderInteropComponent.razor index 57f99f485a..41bcfe275d 100644 --- a/src/Components/test/testassets/BasicTestApp/AfterRenderInteropComponent.razor +++ b/src/Components/test/testassets/BasicTestApp/AfterRenderInteropComponent.razor @@ -6,7 +6,7 @@ @code { ElementReference myInput; - protected override void OnAfterRender() + protected override void OnAfterRender(bool firstRender) { JSRuntime.InvokeAsync("setElementValue", myInput, "Value set after render"); } diff --git a/src/Components/test/testassets/BasicTestApp/InteropOnInitializationComponent.razor b/src/Components/test/testassets/BasicTestApp/InteropOnInitializationComponent.razor index ae3f3491e3..b6c0b4e512 100644 --- a/src/Components/test/testassets/BasicTestApp/InteropOnInitializationComponent.razor +++ b/src/Components/test/testassets/BasicTestApp/InteropOnInitializationComponent.razor @@ -26,17 +26,9 @@ string infoFromJs; ElementReference myElem; - protected override async Task OnAfterRenderAsync() + protected override async Task OnAfterRenderAsync(bool firstRender) { - // TEMPORARY: Currently we need this guard to avoid making the interop - // call during prerendering. Soon this will be unnecessary because we - // will change OnAfterRenderAsync not to run during the prerendering phase. - if (!ComponentContext.IsConnected) - { - return; - } - - if (infoFromJs == null) + if (firstRender) { // We can only use the ElementRef in OnAfterRenderAsync (and not any // earlier lifecycle method), because there is no JS element until diff --git a/src/Components/test/testassets/BasicTestApp/PrerenderedToInteractiveTransition.razor b/src/Components/test/testassets/BasicTestApp/PrerenderedToInteractiveTransition.razor index 5fd043e055..59020435e3 100644 --- a/src/Components/test/testassets/BasicTestApp/PrerenderedToInteractiveTransition.razor +++ b/src/Components/test/testassets/BasicTestApp/PrerenderedToInteractiveTransition.razor @@ -23,13 +23,10 @@ @code { int count; - bool firstRender = false; - protected override Task OnAfterRenderAsync() + protected override Task OnAfterRenderAsync(bool firstRender) { - if (!firstRender) + if (firstRender) { - firstRender = true; - // We need to queue another render when we connect, otherwise the // browser won't see anything. StateHasChanged(); diff --git a/src/Mvc/Mvc.ViewFeatures/test/HtmlHelperComponentExtensionsTests.cs b/src/Mvc/Mvc.ViewFeatures/test/HtmlHelperComponentExtensionsTests.cs index 421fc49d37..3947f3fd5a 100644 --- a/src/Mvc/Mvc.ViewFeatures/test/HtmlHelperComponentExtensionsTests.cs +++ b/src/Mvc/Mvc.ViewFeatures/test/HtmlHelperComponentExtensionsTests.cs @@ -333,7 +333,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures.Test { [Parameter] public OnAfterRenderState State { get; set; } - protected override void OnAfterRender() + protected override void OnAfterRender(bool firstRender) { State.OnAfterRenderRan = true; } From 116e5bdd9ab6daf207782cafaf91edfc5e068718 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2019 03:35:16 +0000 Subject: [PATCH 18/24] [release/3.0] Update dependencies from 2 repositories (#13083) * Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190812.2 - Microsoft.NET.Sdk.Razor - 3.0.0-preview9.19412.2 - Microsoft.CodeAnalysis.Razor - 3.0.0-preview9.19412.2 - Microsoft.AspNetCore.Razor.Language - 3.0.0-preview9.19412.2 - Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview9.19412.2 * Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190812.3 - Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview9.19412.3 - Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview9.19412.3 - dotnet-ef - 3.0.0-preview9.19412.3 - Microsoft.EntityFrameworkCore - 3.0.0-preview9.19412.3 - Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview9.19412.3 - Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview9.19412.3 - Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview9.19412.3 Dependency coherency updates - Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.Memory - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Binder - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Ini - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Json - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration.Xml - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Configuration - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DependencyInjection - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Hosting - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Http - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Localization - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Configuration - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Console - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Debug - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventSource - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.EventLog - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Logging.Testing - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ObjectPool - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Options - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.Primitives - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Extensions.WebEncoders - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Internal.Extensions.Refs - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.JSInterop - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Mono.WebAssembly.Interop - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview9-19410-12 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.Logging - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.CSharp - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Win32.Registry - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Win32.SystemEvents - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ComponentModel.Annotations - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Diagnostics.EventLog - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Drawing.Common - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.IO.Pipelines - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Net.Http.WinHttpHandler - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Net.WebSockets.WebSocketProtocol - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Reflection.Metadata - 1.7.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Runtime.CompilerServices.Unsafe - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Cng - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Pkcs - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Cryptography.Xml - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Permissions - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Security.Principal.Windows - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.ServiceProcess.ServiceController - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Encodings.Web - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Text.Json - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Threading.Channels - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - System.Windows.Extensions - 4.6.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.Extensions.DependencyModel - 3.0.0-preview9-19410-12 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Ref - 3.0.0-preview9-19410-12 (parent: Microsoft.Extensions.Logging) - NETStandard.Library.Ref - 2.1.0-preview9-19410-12 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.Platforms - 3.0.0-preview9.19409.17 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Internal.AspNetCore.Analyzers - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.AspNetCore.Testing - 3.0.0-preview9.19411.2 (parent: Microsoft.EntityFrameworkCore) - Microsoft.Net.Compilers.Toolset - 3.3.0-beta3-19409-05 (parent: Microsoft.Extensions.Logging) --- eng/Version.Details.xml | 400 ++++++++++++++++++++-------------------- eng/Versions.props | 200 ++++++++++---------- 2 files changed, 300 insertions(+), 300 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a9c142caf1..6bbaaaf86f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,408 +13,408 @@ https://github.com/aspnet/Blazor 498a843f7854f9a2a5820e55cd2c7d7654429682 - + https://github.com/aspnet/AspNetCore-Tooling - 80619654bb1b9b8c2b57f36ce7b707e540d7d2e2 + 3e788675fd3dab5fddd7b9aba9225e5b5ebbd946 - + https://github.com/aspnet/AspNetCore-Tooling - 80619654bb1b9b8c2b57f36ce7b707e540d7d2e2 + 3e788675fd3dab5fddd7b9aba9225e5b5ebbd946 - + https://github.com/aspnet/AspNetCore-Tooling - 80619654bb1b9b8c2b57f36ce7b707e540d7d2e2 + 3e788675fd3dab5fddd7b9aba9225e5b5ebbd946 - + https://github.com/aspnet/AspNetCore-Tooling - 80619654bb1b9b8c2b57f36ce7b707e540d7d2e2 + 3e788675fd3dab5fddd7b9aba9225e5b5ebbd946 - + https://github.com/aspnet/EntityFrameworkCore - b5ed92f43b87dd7b9c5452bc87e0c849d08efdf8 + e33237ee4210a27d16747aba8dd655cabc808922 - + https://github.com/aspnet/EntityFrameworkCore - b5ed92f43b87dd7b9c5452bc87e0c849d08efdf8 + e33237ee4210a27d16747aba8dd655cabc808922 - + https://github.com/aspnet/EntityFrameworkCore - b5ed92f43b87dd7b9c5452bc87e0c849d08efdf8 + e33237ee4210a27d16747aba8dd655cabc808922 - + https://github.com/aspnet/EntityFrameworkCore - b5ed92f43b87dd7b9c5452bc87e0c849d08efdf8 + e33237ee4210a27d16747aba8dd655cabc808922 - + https://github.com/aspnet/EntityFrameworkCore - b5ed92f43b87dd7b9c5452bc87e0c849d08efdf8 + e33237ee4210a27d16747aba8dd655cabc808922 - + https://github.com/aspnet/EntityFrameworkCore - b5ed92f43b87dd7b9c5452bc87e0c849d08efdf8 + e33237ee4210a27d16747aba8dd655cabc808922 - + https://github.com/aspnet/EntityFrameworkCore - b5ed92f43b87dd7b9c5452bc87e0c849d08efdf8 + e33237ee4210a27d16747aba8dd655cabc808922 - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 https://github.com/dotnet/corefx a28176b5ec68b6da1472934fe9493790d1665cae - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/dotnet/core-setup - 88e391bb71d5659c28fdb23434752cab6878cc06 + 9408f55c19a0a9118a23b05f83200a3534dd9f7f - + https://github.com/dotnet/core-setup - 88e391bb71d5659c28fdb23434752cab6878cc06 + 9408f55c19a0a9118a23b05f83200a3534dd9f7f - + https://github.com/dotnet/core-setup - 88e391bb71d5659c28fdb23434752cab6878cc06 + 9408f55c19a0a9118a23b05f83200a3534dd9f7f - + https://github.com/dotnet/core-setup - 88e391bb71d5659c28fdb23434752cab6878cc06 + 9408f55c19a0a9118a23b05f83200a3534dd9f7f - + https://github.com/dotnet/corefx - f7948ea046c74fda9776d7150ea5770c2cd94845 + b82d2bc44424c8a99a1f0fc13202bdfd43e6f9f5 - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f https://github.com/dotnet/arcade @@ -428,13 +428,13 @@ https://github.com/dotnet/arcade a11024c8c22cc762011addafc30c653c938048f4 - + https://github.com/aspnet/Extensions - 77403f35be5559b01c7d10074f3670e636c49811 + 14c51735aa12343b7b0e53ae775990ab9c98c42f - + https://github.com/dotnet/roslyn - a06bcb44c6bc374d1af6b2a0b3eb9e7f0fed1913 + ed92d532473db83c1db47b313ee1c1bd7520aa08 diff --git a/eng/Versions.props b/eng/Versions.props index a130466ec1..71b66d08a9 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -52,115 +52,115 @@ 1.0.0-beta.19411.1 - 3.3.0-beta2-19407-12 + 3.3.0-beta3-19409-05 - 3.0.0-preview9-19407-10 - 3.0.0-preview9-19407-10 - 3.0.0-preview9-19407-10 - 2.1.0-preview9-19407-10 + 3.0.0-preview9-19410-12 + 3.0.0-preview9-19410-12 + 3.0.0-preview9-19410-12 + 2.1.0-preview9-19410-12 - 1.0.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 + 1.0.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 4.7.0-preview6.19264.9 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 1.7.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 - 4.6.0-preview9.19407.4 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 1.7.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 + 4.6.0-preview9.19409.17 - 3.0.0-preview9.19407.4 + 3.0.0-preview9.19409.17 3.0.0-preview9.19405.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 + 3.0.0-preview9.19411.2 - 3.0.0-preview9.19411.3 - 3.0.0-preview9.19411.3 - 3.0.0-preview9.19411.3 - 3.0.0-preview9.19411.3 - 3.0.0-preview9.19411.3 - 3.0.0-preview9.19411.3 - 3.0.0-preview9.19411.3 + 3.0.0-preview9.19412.3 + 3.0.0-preview9.19412.3 + 3.0.0-preview9.19412.3 + 3.0.0-preview9.19412.3 + 3.0.0-preview9.19412.3 + 3.0.0-preview9.19412.3 + 3.0.0-preview9.19412.3 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 - 3.0.0-preview9.19411.1 + 3.0.0-preview9.19412.2 + 3.0.0-preview9.19412.2 + 3.0.0-preview9.19412.2 + 3.0.0-preview9.19412.2 + @@ -44,7 +45,6 @@ - diff --git a/eng/Versions.props b/eng/Versions.props index 71b66d08a9..648fe409f8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -222,11 +222,11 @@ 4.2.1 3.8.0 0.1.22-pre3 - 3.0.0-preview3.4 - 3.0.0-preview3.4 - 3.0.0-preview3.4 - 3.0.0-preview3.4 - 3.0.0-preview3.4 + 3.0.0-preview7.33 + 3.0.0-preview7.33 + 3.0.0-preview7.33 + 3.0.0-preview7.33 + 3.0.0-preview7.33 1.7.3.7 4.10.0 0.10.1 diff --git a/src/Identity/ApiAuthorization.IdentityServer/ref/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj b/src/Identity/ApiAuthorization.IdentityServer/ref/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj deleted file mode 100644 index ee37205aff..0000000000 --- a/src/Identity/ApiAuthorization.IdentityServer/ref/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - netcoreapp3.0 - - - - - - - - - - - - - - diff --git a/src/Identity/ApiAuthorization.IdentityServer/ref/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.netcoreapp3.0.cs b/src/Identity/ApiAuthorization.IdentityServer/ref/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.netcoreapp3.0.cs deleted file mode 100644 index 63439f559a..0000000000 --- a/src/Identity/ApiAuthorization.IdentityServer/ref/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.netcoreapp3.0.cs +++ /dev/null @@ -1,160 +0,0 @@ -// 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. - -namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer -{ - public partial class ApiAuthorizationDbContext : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext, IdentityServer4.EntityFramework.Interfaces.IPersistedGrantDbContext, System.IDisposable where TUser : Microsoft.AspNetCore.Identity.IdentityUser - { - public ApiAuthorizationDbContext(Microsoft.EntityFrameworkCore.DbContextOptions options, Microsoft.Extensions.Options.IOptions operationalStoreOptions) { } - public Microsoft.EntityFrameworkCore.DbSet DeviceFlowCodes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.EntityFrameworkCore.DbSet PersistedGrants { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - System.Threading.Tasks.Task IdentityServer4.EntityFramework.Interfaces.IPersistedGrantDbContext.SaveChangesAsync() { throw null; } - protected override void OnModelCreating(Microsoft.EntityFrameworkCore.ModelBuilder builder) { } - } - public partial class ApiAuthorizationOptions - { - public ApiAuthorizationOptions() { } - public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceCollection ApiResources { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection Clients { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceCollection IdentityResources { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.IdentityModel.Tokens.SigningCredentials SigningCredential { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class ApiResourceBuilder - { - public ApiResourceBuilder() { } - public ApiResourceBuilder(IdentityServer4.Models.ApiResource resource) { } - public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder AllowAllClients() { throw null; } - public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder ApiResource(string name) { throw null; } - public IdentityServer4.Models.ApiResource Build() { throw null; } - public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder IdentityServerJwt(string name) { throw null; } - public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder ReplaceScopes(params string[] resourceScopes) { throw null; } - public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder WithApplicationProfile(string profile) { throw null; } - public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder WithScopes(params string[] resourceScopes) { throw null; } - } - public partial class ApiResourceCollection : System.Collections.ObjectModel.Collection - { - public ApiResourceCollection() { } - public ApiResourceCollection(System.Collections.Generic.IList list) { } - public IdentityServer4.Models.ApiResource this[string key] { get { throw null; } } - public void AddApiResource(string name, System.Action configure) { } - public void AddIdentityServerJwt(string name, System.Action configure) { } - public void AddRange(params IdentityServer4.Models.ApiResource[] resources) { } - } - public static partial class ApplicationProfiles - { - public const string API = "API"; - public const string IdentityServerJwt = "IdentityServerJwt"; - public const string IdentityServerSPA = "IdentityServerSPA"; - public const string NativeApp = "NativeApp"; - public const string SPA = "SPA"; - } - public static partial class ApplicationProfilesPropertyNames - { - public const string Clients = "Clients"; - public const string Profile = "Profile"; - public const string Source = "Source"; - } - public static partial class ApplicationProfilesPropertyValues - { - public const string AllowAllApplications = "*"; - public const string Configuration = "Configuration"; - public const string Default = "Default"; - } - public partial class ClientBuilder - { - public ClientBuilder() { } - public ClientBuilder(IdentityServer4.Models.Client client) { } - public IdentityServer4.Models.Client Build() { throw null; } - public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder IdentityServerSPA(string clientId) { throw null; } - public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder NativeApp(string clientId) { throw null; } - public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder SPA(string clientId) { throw null; } - public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder WithApplicationProfile(string profile) { throw null; } - public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder WithClientId(string clientId) { throw null; } - public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder WithLogoutRedirectUri(string logoutUri) { throw null; } - public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder WithoutClientSecrets() { throw null; } - public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder WithRedirectUri(string redirectUri) { throw null; } - public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder WithScopes(params string[] scopes) { throw null; } - } - public partial class ClientCollection : System.Collections.ObjectModel.Collection - { - public ClientCollection() { } - public ClientCollection(System.Collections.Generic.IList list) { } - public IdentityServer4.Models.Client this[string key] { get { throw null; } } - public void AddIdentityServerSPA(string clientId, System.Action configure) { } - public void AddNativeApp(string clientId, System.Action configure) { } - public void AddRange(params IdentityServer4.Models.Client[] clients) { } - public void AddSPA(string clientId, System.Action configure) { } - } - [Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElementAttribute("*", Attributes="[asp-apiauth-parameters]")] - public partial class ClientParametersTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper - { - public ClientParametersTagHelper(Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IClientRequestParametersProvider clientRequestParametersProvider) { } - [Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeNameAttribute("asp-apiauth-parameters")] - public string ClientId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - [Microsoft.AspNetCore.Mvc.ViewFeatures.ViewContextAttribute] - public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public override void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) { } - } - public partial interface IClientRequestParametersProvider - { - System.Collections.Generic.IDictionary GetClientParameters(Microsoft.AspNetCore.Http.HttpContext context, string clientId); - } - public partial class IdentityResourceBuilder - { - public IdentityResourceBuilder() { } - public IdentityResourceBuilder(IdentityServer4.Models.IdentityResource resource) { } - public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder Address() { throw null; } - public Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder AllowAllClients() { throw null; } - public IdentityServer4.Models.IdentityResource Build() { throw null; } - public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder Email() { throw null; } - public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder OpenId() { throw null; } - public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder Phone() { throw null; } - public static Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder Profile() { throw null; } - } - public partial class IdentityResourceCollection : System.Collections.ObjectModel.Collection - { - public IdentityResourceCollection() { } - public IdentityResourceCollection(System.Collections.Generic.IList list) { } - public IdentityServer4.Models.IdentityResource this[string key] { get { throw null; } } - public void AddAddress() { } - public void AddAddress(System.Action configure) { } - public void AddEmail() { } - public void AddEmail(System.Action configure) { } - public void AddOpenId() { } - public void AddOpenId(System.Action configure) { } - public void AddPhone() { } - public void AddPhone(System.Action configure) { } - public void AddProfile() { } - public void AddProfile(System.Action configure) { } - public void AddRange(params IdentityServer4.Models.IdentityResource[] identityResources) { } - } - public partial class IdentityServerJwtConstants - { - public const string IdentityServerJwtBearerScheme = "IdentityServerJwtBearer"; - public const string IdentityServerJwtScheme = "IdentityServerJwt"; - public IdentityServerJwtConstants() { } - } -} -namespace Microsoft.AspNetCore.Authentication -{ - public static partial class AuthenticationBuilderExtensions - { - public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddIdentityServerJwt(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder) { throw null; } - } -} -namespace Microsoft.Extensions.DependencyInjection -{ - public static partial class IdentityServerBuilderConfigurationExtensions - { - public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddApiAuthorization(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder) where TUser : class where TContext : Microsoft.EntityFrameworkCore.DbContext, IdentityServer4.EntityFramework.Interfaces.IPersistedGrantDbContext { throw null; } - public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddApiAuthorization(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder, System.Action configure) where TUser : class where TContext : Microsoft.EntityFrameworkCore.DbContext, IdentityServer4.EntityFramework.Interfaces.IPersistedGrantDbContext { throw null; } - public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddApiResources(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder) { throw null; } - public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddApiResources(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration) { throw null; } - public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddClients(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder) { throw null; } - public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddClients(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration) { throw null; } - public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddIdentityResources(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder) { throw null; } - public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddIdentityResources(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration) { throw null; } - public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddSigningCredentials(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder) { throw null; } - public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddSigningCredentials(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration) { throw null; } - } -} diff --git a/src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/ApiAuthSample.csproj b/src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/ApiAuthSample.csproj index df96819c67..c9883821b4 100644 --- a/src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/ApiAuthSample.csproj +++ b/src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/ApiAuthSample.csproj @@ -3,9 +3,14 @@ netcoreapp3.0 aspnet-ApiAuthSample-12ED8ECC-9EF1-4D31-87B4-1405B3198E5E + + false + + diff --git a/src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj b/src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj index b6489a710a..7c09a6e368 100644 --- a/src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj +++ b/src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj @@ -5,19 +5,29 @@ ASP.NET Core API Authorization package powered by Identity Server. true aspnetcore;apiauth;identity + false true + false + + false + + - + + + + diff --git a/src/Identity/ApiAuthorization.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj b/src/Identity/ApiAuthorization.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj index 27c97dc746..e2030d5620 100644 --- a/src/Identity/ApiAuthorization.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj +++ b/src/Identity/ApiAuthorization.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj @@ -2,9 +2,15 @@ netcoreapp3.0 + + false + + + diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in b/src/ProjectTemplates/Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in index bd29440fcf..09d68a25ee 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in @@ -20,6 +20,7 @@ + diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj b/src/ProjectTemplates/Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj index 27759899a0..28df34bc4f 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj @@ -12,6 +12,7 @@ MicrosoftEntityFrameworkCoreSqlitePackageVersion=$(MicrosoftEntityFrameworkCoreSqlitePackageVersion); + MicrosoftEntityFrameworkCoreRelationalPackageVersion=$(MicrosoftEntityFrameworkCoreRelationalPackageVersion); MicrosoftEntityFrameworkCoreSqlServerPackageVersion=$(MicrosoftEntityFrameworkCoreSqlServerPackageVersion); MicrosoftEntityFrameworkCoreToolsPackageVersion=$(MicrosoftEntityFrameworkCoreToolsPackageVersion); MicrosoftExtensionsHostingPackageVersion=$(MicrosoftExtensionsHostingPackageVersion); diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/React-CSharp.csproj.in b/src/ProjectTemplates/Web.Spa.ProjectTemplates/React-CSharp.csproj.in index dc4897f498..8e4a8b80e4 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/React-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/React-CSharp.csproj.in @@ -17,6 +17,7 @@ + diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package-lock.json b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package-lock.json index 80523dc4fd..1318c47924 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package-lock.json +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package-lock.json @@ -1701,8 +1701,7 @@ "base64-js": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" }, "base64id": { "version": "1.0.0", @@ -2747,6 +2746,11 @@ "randomfill": "^1.0.3" } }, + "crypto-js": { + "version": "3.1.9-1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", + "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg=" + }, "css-parse": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", @@ -7153,10 +7157,13 @@ "dev": true }, "oidc-client": { - "version": "1.9.0-beta.3", - "resolved": "https://registry.npmjs.org/oidc-client/-/oidc-client-1.9.0-beta.3.tgz", - "integrity": "sha512-8JqmesN7n7sQrdeEYiuWyWjNp/6cZGOHU5IaYrULm/qdYo6cAheeZl93bDkob6MdfbQMsQ2HGG/+EOHFdFQcSQ==", + "version": "1.9.0-beta.4", + "resolved": "https://registry.npmjs.org/oidc-client/-/oidc-client-1.9.0-beta.4.tgz", + "integrity": "sha512-BE6o220w9kDTicmsX324Z5t3Gg20G9NgQjCOFP6SUY7glJYBohyw9DVPt/khPmmg+wabufJq1tH2zyEadMf7Pw==", "requires": { + "base64-js": "^1.3.0", + "core-js": "^2.6.4", + "crypto-js": "^3.1.9-1", "uuid": "^3.3.2" } }, diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package.json b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package.json index c249e23305..c30b740221 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package.json +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package.json @@ -26,7 +26,7 @@ "bootstrap": "^4.3.1", "core-js": "^2.6.5", "jquery": "3.4.1", - "oidc-client": "^1.9.0-beta.1", + "oidc-client": "^1.9.0-beta.4", "popper.js": "^1.14.3", "rxjs": "^6.4.0", "zone.js": "~0.9.1" diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/authorize.service.ts b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/authorize.service.ts index 7c46a3e27b..ce9e28bfa3 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/authorize.service.ts +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/authorize.service.ts @@ -21,7 +21,6 @@ export interface FailureAuthenticationResult { export interface RedirectAuthenticationResult { status: AuthenticationResultStatus.Redirect; - redirectUrl: string; } export enum AuthenticationResultStatus { @@ -34,18 +33,6 @@ export interface IUser { name: string; } -// Private interfaces -enum LoginMode { - Silent, - PopUp, - Redirect -} - -interface IAuthenticationState { - mode: LoginMode; - userState?: any; -} - @Injectable({ providedIn: 'root' }) @@ -86,7 +73,7 @@ export class AuthorizeService { await this.ensureUserManagerInitialized(); let user: User = null; try { - user = await this.userManager.signinSilent(this.createArguments(LoginMode.Silent)); + user = await this.userManager.signinSilent(this.createArguments()); this.userSubject.next(user.profile); return this.success(state); } catch (silentError) { @@ -97,7 +84,7 @@ export class AuthorizeService { if (this.popUpDisabled) { throw new Error('Popup disabled. Change \'authorize.service.ts:AuthorizeService.popupDisabled\' to false to enable it.'); } - user = await this.userManager.signinPopup(this.createArguments(LoginMode.PopUp)); + user = await this.userManager.signinPopup(this.createArguments()); this.userSubject.next(user.profile); return this.success(state); } catch (popupError) { @@ -110,9 +97,8 @@ export class AuthorizeService { // PopUps might be blocked by the user, fallback to redirect try { - const signInRequest = await this.userManager.createSigninRequest( - this.createArguments(LoginMode.Redirect, state)); - return this.redirect(signInRequest.url); + await this.userManager.signinRedirect(this.createArguments(state)); + return this.redirect(); } catch (redirectError) { console.log('Redirect authentication error: ', redirectError); return this.error(redirectError); @@ -121,56 +107,29 @@ export class AuthorizeService { } } - // We are receiving a callback from the IdP. This code can be running in 3 situations: - // 1) As a hidden iframe started by a silent login on signIn (above). The code in the main - // browser window will close the iframe after returning from signInSilent. - // 2) As a PopUp window started by a pop-up login on signIn (above). The code in the main - // browser window will close the pop-up window after returning from signInPopUp - // 3) On the main browser window when the IdP redirects back to the app. We will process - // the response and redirect to the return url or display an error message. public async completeSignIn(url: string): Promise { - await this.ensureUserManagerInitialized(); try { - const { state } = await (this.userManager as any).readSigninResponseState(url, this.userManager.settings.stateStore); - if (state.request_type === 'si:r' || !state.request_type) { - const user = await this.userManager.signinRedirectCallback(url); - this.userSubject.next(user.profile); - return this.success(state.data.userState); - - } - if (state.request_type === 'si:p') { - await this.userManager.signinPopupCallback(url); - return this.success(undefined); - } - if (state.request_type === 'si:s') { - await this.userManager.signinSilentCallback(url); - return this.success(undefined); - } - - throw new Error(`Invalid login mode '${state.request_type}'.`); - } catch (signInResponseError) { - console.log('There was an error signing in', signInResponseError); - return this.error('Sing in callback authentication error.'); + await this.ensureUserManagerInitialized(); + const user = await this.userManager.signinCallback(url); + this.userSubject.next(user && user.profile); + return this.success(user && user.state); + } catch (error) { + console.log('There was an error signing in: ', error); + return this.error('There was an error signing in.'); } } - // We try to sign out the user in two different ways: - // 1) We try to do a sign-out using a PopUp Window. This might fail if there is a - // Pop-Up blocker or the user has disabled PopUps. - // 2) If the method above fails, we redirect the browser to the IdP to perform a traditional - // post logout redirect flow. public async signOut(state: any): Promise { - await this.ensureUserManagerInitialized(); try { - await this.userManager.signoutPopup(this.createArguments(LoginMode.PopUp)); + await this.ensureUserManagerInitialized(); + await this.userManager.signoutPopup(this.createArguments()); this.userSubject.next(null); return this.success(state); } catch (popupSignOutError) { console.log('Popup signout error: ', popupSignOutError); try { - const signInRequest = await this.userManager.createSignoutRequest( - this.createArguments(LoginMode.Redirect, state)); - return this.redirect(signInRequest.url); + await this.userManager.signoutRedirect(this.createArguments(state)); + return this.redirect(); } catch (redirectSignOutError) { console.log('Redirect signout error: ', popupSignOutError); return this.error(redirectSignOutError); @@ -178,39 +137,20 @@ export class AuthorizeService { } } - // We are receiving a callback from the IdP. This code can be running in 2 situations: - // 1) As a PopUp window started by a pop-up login on signOut (above). The code in the main - // browser window will close the pop-up window after returning from signOutPopUp - // 2) On the main browser window when the IdP redirects back to the app. We will process - // the response and redirect to the logged-out url or display an error message. public async completeSignOut(url: string): Promise { await this.ensureUserManagerInitialized(); try { - const { state } = await (this.userManager as any).readSignoutResponseState(url, this.userManager.settings.stateStore); - if (state) { - if (state.request_type === 'so:r') { - await this.userManager.signoutRedirectCallback(url); - this.userSubject.next(null); - return this.success(state.data.userState); - } - if (state.request_type === 'so:p') { - await this.userManager.signoutPopupCallback(url); - return this.success(state.data && state.data.userState); - } - throw new Error(`Invalid login mode '${state.request_type}'.`); - } - } catch (signInResponseError) { - console.log('There was an error signing out', signInResponseError); - return this.error('Sign out callback authentication error.'); + const state = await this.userManager.signoutCallback(url); + this.userSubject.next(null); + return this.success(state && state.data); + } catch (error) { + console.log(`There was an error trying to log out '${error}'.`); + return this.error(error); } } - private createArguments(mode: LoginMode, state?: any): any { - if (mode !== LoginMode.Silent) { - return { data: { mode, userState: state } }; - } else { - return { data: { mode, userState: state }, redirect_uri: this.userManager.settings.redirect_uri }; - } + private createArguments(state?: any): any { + return { useReplaceToNavigate: true, data: state }; } private error(message: string): IAuthenticationResult { @@ -221,8 +161,8 @@ export class AuthorizeService { return { status: AuthenticationResultStatus.Success, state }; } - private redirect(redirectUrl: string): IAuthenticationResult { - return { status: AuthenticationResultStatus.Redirect, redirectUrl }; + private redirect(): IAuthenticationResult { + return { status: AuthenticationResultStatus.Redirect }; } private async ensureUserManagerInitialized(): Promise { diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/login/login.component.ts b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/login/login.component.ts index b48738b645..f90d0df380 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/login/login.component.ts +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/login/login.component.ts @@ -52,10 +52,6 @@ export class LoginComponent implements OnInit { this.message.next(undefined); switch (result.status) { case AuthenticationResultStatus.Redirect: - // We replace the location here so that in case the user hits the back - // arrow from within the login page they don't get into an infinite - // redirect loop. - window.location.replace(result.redirectUrl); break; case AuthenticationResultStatus.Success: await this.navigateToReturnUrl(returnUrl); diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/logout/logout.component.ts b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/logout/logout.component.ts index d9402f007e..78969d39bf 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/logout/logout.component.ts +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/logout/logout.component.ts @@ -53,9 +53,6 @@ export class LogoutComponent implements OnInit { const result = await this.authorizeService.signOut(state); switch (result.status) { case AuthenticationResultStatus.Redirect: - // We replace the location here so that in case the user hits the back - // arrow from within the IdP they don't get into an infinite redirect loop. - window.location.replace(result.redirectUrl); break; case AuthenticationResultStatus.Success: await this.navigateToReturnUrl(returnUrl); diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.Designer.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.Designer.cs index 8901c5fea8..d79b0e6698 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.Designer.cs +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.Designer.cs @@ -10,52 +10,67 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace Company.WebApplication1.Data.Migrations { [DbContext(typeof(ApplicationDbContext))] - [Migration("00000000000000_CreateIdentitySchema")] + [Migration("20190808120446_CreateIdentitySchema")] partial class CreateIdentitySchema { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3") + .HasAnnotation("ProductVersion", "3.0.0-preview9.19405.13") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); - b.Property("AccessFailedCount"); + b.Property("AccessFailedCount") + .HasColumnType("int"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); b.Property("Email") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); - b.Property("EmailConfirmed"); + b.Property("EmailConfirmed") + .HasColumnType("bit"); - b.Property("LockoutEnabled"); + b.Property("LockoutEnabled") + .HasColumnType("bit"); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); b.Property("NormalizedEmail") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("NormalizedUserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); - b.Property("PasswordHash"); + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); - b.Property("PhoneNumber"); + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); - b.Property("PhoneNumberConfirmed"); + b.Property("PhoneNumberConfirmed") + .HasColumnType("bit"); - b.Property("SecurityStamp"); + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); - b.Property("TwoFactorEnabled"); + b.Property("TwoFactorEnabled") + .HasColumnType("bit"); b.Property("UserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -74,26 +89,33 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b => { b.Property("UserCode") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") .IsRequired() + .HasColumnType("nvarchar(max)") .HasMaxLength(50000); b.Property("DeviceCode") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Expiration") - .IsRequired(); + .IsRequired() + .HasColumnType("datetime2"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.HasKey("UserCode"); @@ -101,51 +123,64 @@ namespace Company.WebApplication1.Data.Migrations b.HasIndex("DeviceCode") .IsUnique(); + b.HasIndex("Expiration"); + b.ToTable("DeviceCodes"); }); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => { b.Property("Key") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") .IsRequired() + .HasColumnType("nvarchar(max)") .HasMaxLength(50000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("nvarchar(50)") .HasMaxLength(50); b.HasKey("Key"); - b.HasIndex("SubjectId", "ClientId", "Type"); + b.HasIndex("SubjectId", "ClientId", "Type", "Expiration"); b.ToTable("PersistedGrants"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); b.Property("Name") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("NormalizedName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -162,14 +197,18 @@ namespace Company.WebApplication1.Data.Migrations { b.Property("Id") .ValueGeneratedOnAdd() + .HasColumnType("int") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); b.Property("RoleId") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(450)"); b.HasKey("Id"); @@ -182,14 +221,18 @@ namespace Company.WebApplication1.Data.Migrations { b.Property("Id") .ValueGeneratedOnAdd() + .HasColumnType("int") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(450)"); b.HasKey("Id"); @@ -201,15 +244,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("ProviderKey") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("ProviderDisplayName"); + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(450)"); b.HasKey("LoginProvider", "ProviderKey"); @@ -220,9 +267,11 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("nvarchar(450)"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("nvarchar(450)"); b.HasKey("UserId", "RoleId"); @@ -233,15 +282,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("nvarchar(450)"); b.Property("LoginProvider") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("Name") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("Value"); + b.Property("Value") + .HasColumnType("nvarchar(max)"); b.HasKey("UserId", "LoginProvider", "Name"); diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.cs index b297cf37fb..151e8b2206 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.cs +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.cs @@ -1,5 +1,4 @@ using System; -using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; namespace Company.WebApplication1.Data.Migrations @@ -86,7 +85,7 @@ namespace Company.WebApplication1.Data.Migrations columns: table => new { Id = table.Column(nullable: false) - .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), + .Annotation("SqlServer:Identity", "1, 1"), RoleId = table.Column(nullable: false), ClaimType = table.Column(nullable: true), ClaimValue = table.Column(nullable: true) @@ -107,7 +106,7 @@ namespace Company.WebApplication1.Data.Migrations columns: table => new { Id = table.Column(nullable: false) - .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), + .Annotation("SqlServer:Identity", "1, 1"), UserId = table.Column(nullable: false), ClaimType = table.Column(nullable: true), ClaimValue = table.Column(nullable: true) @@ -233,9 +232,14 @@ namespace Company.WebApplication1.Data.Migrations unique: true); migrationBuilder.CreateIndex( - name: "IX_PersistedGrants_SubjectId_ClientId_Type", + name: "IX_DeviceCodes_Expiration", + table: "DeviceCodes", + column: "Expiration"); + + migrationBuilder.CreateIndex( + name: "IX_PersistedGrants_SubjectId_ClientId_Type_Expiration", table: "PersistedGrants", - columns: new[] { "SubjectId", "ClientId", "Type" }); + columns: new[] { "SubjectId", "ClientId", "Type", "Expiration" }); } protected override void Down(MigrationBuilder migrationBuilder) diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/ApplicationDbContextModelSnapshot.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/ApplicationDbContextModelSnapshot.cs index 40ca333c0c..6f19b5d805 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/ApplicationDbContextModelSnapshot.cs +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLServer/ApplicationDbContextModelSnapshot.cs @@ -15,45 +15,60 @@ namespace Company.WebApplication1.Data.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3") + .HasAnnotation("ProductVersion", "3.0.0-preview9.19405.13") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); - b.Property("AccessFailedCount"); + b.Property("AccessFailedCount") + .HasColumnType("int"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); b.Property("Email") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); - b.Property("EmailConfirmed"); + b.Property("EmailConfirmed") + .HasColumnType("bit"); - b.Property("LockoutEnabled"); + b.Property("LockoutEnabled") + .HasColumnType("bit"); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); b.Property("NormalizedEmail") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("NormalizedUserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); - b.Property("PasswordHash"); + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); - b.Property("PhoneNumber"); + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); - b.Property("PhoneNumberConfirmed"); + b.Property("PhoneNumberConfirmed") + .HasColumnType("bit"); - b.Property("SecurityStamp"); + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); - b.Property("TwoFactorEnabled"); + b.Property("TwoFactorEnabled") + .HasColumnType("bit"); b.Property("UserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -72,26 +87,33 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b => { b.Property("UserCode") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") .IsRequired() + .HasColumnType("nvarchar(max)") .HasMaxLength(50000); b.Property("DeviceCode") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Expiration") - .IsRequired(); + .IsRequired() + .HasColumnType("datetime2"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.HasKey("UserCode"); @@ -99,51 +121,64 @@ namespace Company.WebApplication1.Data.Migrations b.HasIndex("DeviceCode") .IsUnique(); + b.HasIndex("Expiration"); + b.ToTable("DeviceCodes"); }); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => { b.Property("Key") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") .IsRequired() + .HasColumnType("nvarchar(max)") .HasMaxLength(50000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("nvarchar(50)") .HasMaxLength(50); b.HasKey("Key"); - b.HasIndex("SubjectId", "ClientId", "Type"); + b.HasIndex("SubjectId", "ClientId", "Type", "Expiration"); b.ToTable("PersistedGrants"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); b.Property("Name") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("NormalizedName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -160,14 +195,18 @@ namespace Company.WebApplication1.Data.Migrations { b.Property("Id") .ValueGeneratedOnAdd() + .HasColumnType("int") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); b.Property("RoleId") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(450)"); b.HasKey("Id"); @@ -180,14 +219,18 @@ namespace Company.WebApplication1.Data.Migrations { b.Property("Id") .ValueGeneratedOnAdd() + .HasColumnType("int") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(450)"); b.HasKey("Id"); @@ -199,15 +242,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("ProviderKey") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("ProviderDisplayName"); + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(450)"); b.HasKey("LoginProvider", "ProviderKey"); @@ -218,9 +265,11 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("nvarchar(450)"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("nvarchar(450)"); b.HasKey("UserId", "RoleId"); @@ -231,15 +280,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("nvarchar(450)"); b.Property("LoginProvider") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("Name") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("Value"); + b.Property("Value") + .HasColumnType("nvarchar(max)"); b.HasKey("UserId", "LoginProvider", "Name"); diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.Designer.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.Designer.cs index fb7b4f9ee3..445f3f946d 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.Designer.cs +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.Designer.cs @@ -16,43 +16,58 @@ namespace Company.WebApplication1.Data.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3"); + .HasAnnotation("ProductVersion", "3.0.0-preview9.19405.13"); modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("TEXT"); - b.Property("AccessFailedCount"); + b.Property("AccessFailedCount") + .HasColumnType("INTEGER"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("TEXT"); b.Property("Email") + .HasColumnType("TEXT") .HasMaxLength(256); - b.Property("EmailConfirmed"); + b.Property("EmailConfirmed") + .HasColumnType("INTEGER"); - b.Property("LockoutEnabled"); + b.Property("LockoutEnabled") + .HasColumnType("INTEGER"); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("TEXT"); b.Property("NormalizedEmail") + .HasColumnType("TEXT") .HasMaxLength(256); b.Property("NormalizedUserName") + .HasColumnType("TEXT") .HasMaxLength(256); - b.Property("PasswordHash"); + b.Property("PasswordHash") + .HasColumnType("TEXT"); - b.Property("PhoneNumber"); + b.Property("PhoneNumber") + .HasColumnType("TEXT"); - b.Property("PhoneNumberConfirmed"); + b.Property("PhoneNumberConfirmed") + .HasColumnType("INTEGER"); - b.Property("SecurityStamp"); + b.Property("SecurityStamp") + .HasColumnType("TEXT"); - b.Property("TwoFactorEnabled"); + b.Property("TwoFactorEnabled") + .HasColumnType("INTEGER"); b.Property("UserName") + .HasColumnType("TEXT") .HasMaxLength(256); b.HasKey("Id"); @@ -70,26 +85,33 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b => { b.Property("UserCode") + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("TEXT"); b.Property("Data") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(50000); b.Property("DeviceCode") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("Expiration") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.Property("SubjectId") + .HasColumnType("TEXT") .HasMaxLength(200); b.HasKey("UserCode"); @@ -97,51 +119,64 @@ namespace Company.WebApplication1.Data.Migrations b.HasIndex("DeviceCode") .IsUnique(); + b.HasIndex("Expiration"); + b.ToTable("DeviceCodes"); }); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => { b.Property("Key") + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("TEXT"); b.Property("Data") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(50000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("TEXT"); b.Property("SubjectId") + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(50); b.HasKey("Key"); - b.HasIndex("SubjectId", "ClientId", "Type"); + b.HasIndex("SubjectId", "ClientId", "Type", "Expiration"); b.ToTable("PersistedGrants"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("TEXT"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("TEXT"); b.Property("Name") + .HasColumnType("TEXT") .HasMaxLength(256); b.Property("NormalizedName") + .HasColumnType("TEXT") .HasMaxLength(256); b.HasKey("Id"); @@ -156,14 +191,18 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("TEXT"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("TEXT"); b.Property("RoleId") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.HasKey("Id"); @@ -175,14 +214,18 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("TEXT"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("TEXT"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.HasKey("Id"); @@ -194,15 +237,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") + .HasColumnType("TEXT") .HasMaxLength(128); b.Property("ProviderKey") + .HasColumnType("TEXT") .HasMaxLength(128); - b.Property("ProviderDisplayName"); + b.Property("ProviderDisplayName") + .HasColumnType("TEXT"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.HasKey("LoginProvider", "ProviderKey"); @@ -213,9 +260,11 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("TEXT"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("TEXT"); b.HasKey("UserId", "RoleId"); @@ -226,15 +275,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("TEXT"); b.Property("LoginProvider") + .HasColumnType("TEXT") .HasMaxLength(128); b.Property("Name") + .HasColumnType("TEXT") .HasMaxLength(128); - b.Property("Value"); + b.Property("Value") + .HasColumnType("TEXT"); b.HasKey("UserId", "LoginProvider", "Name"); diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.cs index 20ae98cb06..19502e4c12 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.cs +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.cs @@ -230,9 +230,14 @@ namespace Company.WebApplication1.Data.Migrations unique: true); migrationBuilder.CreateIndex( - name: "IX_PersistedGrants_SubjectId_ClientId_Type", + name: "IX_DeviceCodes_Expiration", + table: "DeviceCodes", + column: "Expiration"); + + migrationBuilder.CreateIndex( + name: "IX_PersistedGrants_SubjectId_ClientId_Type_Expiration", table: "PersistedGrants", - columns: new[] { "SubjectId", "ClientId", "Type" }); + columns: new[] { "SubjectId", "ClientId", "Type", "Expiration" }); } protected override void Down(MigrationBuilder migrationBuilder) diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/ApplicationDbContextModelSnapshot.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/ApplicationDbContextModelSnapshot.cs index f037fed08a..00494952dd 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/ApplicationDbContextModelSnapshot.cs +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Data/SQLite/ApplicationDbContextModelSnapshot.cs @@ -14,43 +14,58 @@ namespace Company.WebApplication1.Data.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3"); + .HasAnnotation("ProductVersion", "3.0.0-preview9.19405.13"); modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("TEXT"); - b.Property("AccessFailedCount"); + b.Property("AccessFailedCount") + .HasColumnType("INTEGER"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("TEXT"); b.Property("Email") + .HasColumnType("TEXT") .HasMaxLength(256); - b.Property("EmailConfirmed"); + b.Property("EmailConfirmed") + .HasColumnType("INTEGER"); - b.Property("LockoutEnabled"); + b.Property("LockoutEnabled") + .HasColumnType("INTEGER"); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("TEXT"); b.Property("NormalizedEmail") + .HasColumnType("TEXT") .HasMaxLength(256); b.Property("NormalizedUserName") + .HasColumnType("TEXT") .HasMaxLength(256); - b.Property("PasswordHash"); + b.Property("PasswordHash") + .HasColumnType("TEXT"); - b.Property("PhoneNumber"); + b.Property("PhoneNumber") + .HasColumnType("TEXT"); - b.Property("PhoneNumberConfirmed"); + b.Property("PhoneNumberConfirmed") + .HasColumnType("INTEGER"); - b.Property("SecurityStamp"); + b.Property("SecurityStamp") + .HasColumnType("TEXT"); - b.Property("TwoFactorEnabled"); + b.Property("TwoFactorEnabled") + .HasColumnType("INTEGER"); b.Property("UserName") + .HasColumnType("TEXT") .HasMaxLength(256); b.HasKey("Id"); @@ -68,26 +83,33 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b => { b.Property("UserCode") + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("TEXT"); b.Property("Data") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(50000); b.Property("DeviceCode") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("Expiration") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.Property("SubjectId") + .HasColumnType("TEXT") .HasMaxLength(200); b.HasKey("UserCode"); @@ -95,51 +117,64 @@ namespace Company.WebApplication1.Data.Migrations b.HasIndex("DeviceCode") .IsUnique(); + b.HasIndex("Expiration"); + b.ToTable("DeviceCodes"); }); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => { b.Property("Key") + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("TEXT"); b.Property("Data") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(50000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("TEXT"); b.Property("SubjectId") + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(50); b.HasKey("Key"); - b.HasIndex("SubjectId", "ClientId", "Type"); + b.HasIndex("SubjectId", "ClientId", "Type", "Expiration"); b.ToTable("PersistedGrants"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("TEXT"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("TEXT"); b.Property("Name") + .HasColumnType("TEXT") .HasMaxLength(256); b.Property("NormalizedName") + .HasColumnType("TEXT") .HasMaxLength(256); b.HasKey("Id"); @@ -154,14 +189,18 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("TEXT"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("TEXT"); b.Property("RoleId") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.HasKey("Id"); @@ -173,14 +212,18 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("TEXT"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("TEXT"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.HasKey("Id"); @@ -192,15 +235,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") + .HasColumnType("TEXT") .HasMaxLength(128); b.Property("ProviderKey") + .HasColumnType("TEXT") .HasMaxLength(128); - b.Property("ProviderDisplayName"); + b.Property("ProviderDisplayName") + .HasColumnType("TEXT"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.HasKey("LoginProvider", "ProviderKey"); @@ -211,9 +258,11 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("TEXT"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("TEXT"); b.HasKey("UserId", "RoleId"); @@ -224,15 +273,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("TEXT"); b.Property("LoginProvider") + .HasColumnType("TEXT") .HasMaxLength(128); b.Property("Name") + .HasColumnType("TEXT") .HasMaxLength(128); - b.Property("Value"); + b.Property("Value") + .HasColumnType("TEXT"); b.HasKey("UserId", "LoginProvider", "Name"); diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/app.db b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/app.db index a401a042262528ef07722eaad454fd88c4b19705..d28dbed8379b1f0a5fa75a46ac181886511455f8 100644 GIT binary patch delta 281 zcmZo@;Am*zkO>a-$t+1#NXswEO)OC`W)NUtVq$PmP+(wSV4f)B%*xE5XQHq%Wf4Ei zK?eSVn*|lN^RwDAG6!2vzN@c1`L#SRm!+PerHO&5o}qD*!Zrm)HUmb<>FfcFO3dGw zB{vHSyk+8QjFM#+FV|*llArDt%&5;D?^;oiS(I3knV&bkG?>u?MPP3*qq)0|f)YZF zl4hk0ySTkFW20wNTTx2L9UJ=(>I1NN@yaPq~PzT UpoFAMNkIe2qV4%1j1yM_0Bep`4*&oF delta 216 zcmZo@;Am*zkO>a-$t+1#NXswEO)OC`W)NUtWMptqP+(wSV45i7%*w=|rxUO-Wf4Ei zVFv!gn*|ki^0QhqG6$PazN@c1`K3HBhn}IOfrWvdVUxl(1x7XlMw{vE0gOt_Uzu$- z3knD@^EaBwvWq8bGdAXC=B1=oOs@`R)S4a}%;+(FLolPck!F<)ySTM7W1})y+A|{F vCABOwIn_BoCABy{v^cd0#6l92pT0DNQH2F0GyQxBqa+7R&G!5d#)+!|XhT0v diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/package-lock.json b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/package-lock.json index c6fdc36537..d603279670 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/package-lock.json +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/package-lock.json @@ -3736,6 +3736,11 @@ "randomfill": "^1.0.3" } }, + "crypto-js": { + "version": "3.1.9-1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", + "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg=" + }, "css-blank-pseudo": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-0.1.4.tgz", @@ -8560,11 +8565,21 @@ "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" }, "oidc-client": { - "version": "1.9.0-beta.3", - "resolved": "https://registry.npmjs.org/oidc-client/-/oidc-client-1.9.0-beta.3.tgz", - "integrity": "sha512-8JqmesN7n7sQrdeEYiuWyWjNp/6cZGOHU5IaYrULm/qdYo6cAheeZl93bDkob6MdfbQMsQ2HGG/+EOHFdFQcSQ==", + "version": "1.9.0-beta.4", + "resolved": "https://registry.npmjs.org/oidc-client/-/oidc-client-1.9.0-beta.4.tgz", + "integrity": "sha512-BE6o220w9kDTicmsX324Z5t3Gg20G9NgQjCOFP6SUY7glJYBohyw9DVPt/khPmmg+wabufJq1tH2zyEadMf7Pw==", "requires": { + "base64-js": "^1.3.0", + "core-js": "^2.6.4", + "crypto-js": "^3.1.9-1", "uuid": "^3.3.2" + }, + "dependencies": { + "core-js": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", + "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==" + } } }, "on-finished": { diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/package.json b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/package.json index 580683fb1f..83352c75b3 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/package.json +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/package.json @@ -7,7 +7,7 @@ "bootstrap": "^4.1.3", "jquery": "^3.4.1", "merge": "^1.2.1", - "oidc-client": "^1.9.0-beta.1", + "oidc-client": "^1.9.0-beta.4", "react": "^16.0.0", "react-dom": "^16.0.0", "react-router-bootstrap": "^0.24.4", diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/AuthorizeService.js b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/AuthorizeService.js index b6215f4e8d..8987f3fa83 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/AuthorizeService.js +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/AuthorizeService.js @@ -43,7 +43,7 @@ export class AuthorizeService { async signIn(state) { await this.ensureUserManagerInitialized(); try { - const silentUser = await this.userManager.signinSilent(this.createArguments(LoginMode.Silent)); + const silentUser = await this.userManager.signinSilent(this.createArguments()); this.updateState(silentUser); return this.success(state); } catch (silentError) { @@ -55,7 +55,7 @@ export class AuthorizeService { throw new Error('Popup disabled. Change \'AuthorizeService.js:AuthorizeService._popupDisabled\' to false to enable it.') } - const popUpUser = await this.userManager.signinPopup(this.createArguments(LoginMode.PopUp)); + const popUpUser = await this.userManager.signinPopup(this.createArguments()); this.updateState(popUpUser); return this.success(state); } catch (popUpError) { @@ -68,9 +68,8 @@ export class AuthorizeService { // PopUps might be blocked by the user, fallback to redirect try { - const signInRequest = await this.userManager.createSigninRequest( - this.createArguments(LoginMode.Redirect, state)); - return this.redirect(signInRequest.url); + await this.userManager.signinRedirect(this.createArguments(state)); + return this.redirect(); } catch (redirectError) { console.log("Redirect authentication error: ", redirectError); return this.error(redirectError); @@ -79,35 +78,15 @@ export class AuthorizeService { } } - // We are receiving a callback from the IdP. This code can be running in 3 situations: - // 1) As a hidden iframe started by a silent login on signIn (above). The code in the main - // browser window will close the iframe after returning from signInSilent. - // 2) As a PopUp window started by a pop-up login on signIn (above). The code in the main - // browser window will close the pop-up window after returning from signInPopUp - // 3) On the main browser window when the IdP redirects back to the app. We will process - // the response and redirect to the return url or display an error message. async completeSignIn(url) { - await this.ensureUserManagerInitialized(); try { - const { state } = await this.userManager.readSigninResponseState(url, this.userManager.settings.stateStore); - if (state.request_type === 'si:r' || !state.request_type) { - let user = await this.userManager.signinRedirectCallback(url); - this.updateState(user); - return this.success(state.data.userState); - } - if (state.request_type === 'si:p') { - await this.userManager.signinSilentCallback(url); - return this.success(undefined); - } - if (state.request_type === 'si:s') { - await this.userManager.signinSilentCallback(url); - return this.success(undefined); - } - - throw new Error(`Invalid login mode '${state.request_type}'.`); - } catch (signInResponseError) { - console.log('There was an error signing in', signInResponseError); - return this.error('Sing in callback authentication error.'); + await this.ensureUserManagerInitialized(); + const user = await this.userManager.signinCallback(url); + this.updateState(user); + return this.success(user && user.state); + } catch (error) { + console.log('There was an error signing in: ', error); + return this.error('There was an error signing in.'); } } @@ -119,15 +98,14 @@ export class AuthorizeService { async signOut(state) { await this.ensureUserManagerInitialized(); try { - await this.userManager.signoutPopup(this.createArguments(LoginMode.PopUp)); + await this.userManager.signoutPopup(this.createArguments()); this.updateState(undefined); return this.success(state); } catch (popupSignOutError) { console.log("Popup signout error: ", popupSignOutError); try { - const signOutRequest = await this.userManager.createSignoutRequest( - this.createArguments(LoginMode.Redirect, state)); - return this.redirect(signOutRequest.url); + await this.userManager.signoutRedirect(this.createArguments(state)); + return this.redirect(); } catch (redirectSignOutError) { console.log("Redirect signout error: ", redirectSignOutError); return this.error(redirectSignOutError); @@ -135,30 +113,15 @@ export class AuthorizeService { } } - // We are receiving a callback from the IdP. This code can be running in 2 situations: - // 1) As a PopUp window started by a pop-up login on signOut (above). The code in the main - // browser window will close the pop-up window after returning from signOutPopUp - // 2) On the main browser window when the IdP redirects back to the app. We will process - // the response and redirect to the logged-out url or display an error message. async completeSignOut(url) { await this.ensureUserManagerInitialized(); try { - const { state } = await this.userManager.readSignoutResponseState(url, this.userManager.settings.stateStore); - if (state) { - if (state.request_type === 'so:r') { - await this.userManager.signoutRedirectCallback(url); - this.userSubject.next(null); - return this.success(state.data.userState); - } - if (state.request_type === 'so:p') { - await this.userManager.signoutPopupCallback(url); - return this.success(state.data && state.data.userState); - } - throw new Error(`Invalid login mode '${state.request_type}'.`); - } - } catch (signInResponseError) { - console.log('There was an error signing out', signInResponseError); - return this.error('Sign out callback authentication error.'); + const response = await this.userManager.signoutCallback(url); + this.updateState(null); + return this.success(response && response.data); + } catch (error) { + console.log(`There was an error trying to log out '${error}'.`); + return this.error(error); } } @@ -191,12 +154,8 @@ export class AuthorizeService { } } - createArguments(mode, state) { - if (mode !== LoginMode.Silent) { - return { data: { mode, userState: state } }; - } else { - return { data: { mode, userState: state }, redirect_uri: this.userManager.settings.redirect_uri }; - } + createArguments(state) { + return { useReplaceToNavigate: true, data: state }; } error(message) { @@ -207,8 +166,8 @@ export class AuthorizeService { return { status: AuthenticationResultStatus.Success, state }; } - redirect(redirectUrl) { - return { status: AuthenticationResultStatus.Redirect, redirectUrl }; + redirect() { + return { status: AuthenticationResultStatus.Redirect }; } async ensureUserManagerInitialized() { @@ -239,12 +198,6 @@ export class AuthorizeService { static get instance() { return authService } } -const LoginMode = { - Silent: 'silent', - PopUp: 'popup', - Redirect: 'redirect' -} - const authService = new AuthorizeService(); export default authService; diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/Login.js b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/Login.js index 1204fe33b4..7ef201c91c 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/Login.js +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/Login.js @@ -68,10 +68,6 @@ export class Login extends Component { const result = await authService.signIn(state); switch (result.status) { case AuthenticationResultStatus.Redirect: - // We replace the location here so that in case the user hits the back - // arrow from within the login page he doesn't get into an infinite - // redirect loop. - window.location.replace(result.redirectUrl); break; case AuthenticationResultStatus.Success: await this.navigateToReturnUrl(returnUrl); diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/Logout.js b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/Logout.js index 4deb80f7bc..d53769cd8b 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/Logout.js +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/Logout.js @@ -71,9 +71,6 @@ export class Logout extends Component { const result = await authService.signOut(state); switch (result.status) { case AuthenticationResultStatus.Redirect: - // We replace the location here so that in case the user hits the back - // arrow from within the IdP he doesn't get into an infinite redirect loop. - window.location.replace(result.redirectUrl); break; case AuthenticationResultStatus.Success: await this.navigateToReturnUrl(returnUrl); diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.Designer.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.Designer.cs index 8901c5fea8..d79b0e6698 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.Designer.cs +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.Designer.cs @@ -10,52 +10,67 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace Company.WebApplication1.Data.Migrations { [DbContext(typeof(ApplicationDbContext))] - [Migration("00000000000000_CreateIdentitySchema")] + [Migration("20190808120446_CreateIdentitySchema")] partial class CreateIdentitySchema { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3") + .HasAnnotation("ProductVersion", "3.0.0-preview9.19405.13") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); - b.Property("AccessFailedCount"); + b.Property("AccessFailedCount") + .HasColumnType("int"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); b.Property("Email") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); - b.Property("EmailConfirmed"); + b.Property("EmailConfirmed") + .HasColumnType("bit"); - b.Property("LockoutEnabled"); + b.Property("LockoutEnabled") + .HasColumnType("bit"); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); b.Property("NormalizedEmail") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("NormalizedUserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); - b.Property("PasswordHash"); + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); - b.Property("PhoneNumber"); + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); - b.Property("PhoneNumberConfirmed"); + b.Property("PhoneNumberConfirmed") + .HasColumnType("bit"); - b.Property("SecurityStamp"); + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); - b.Property("TwoFactorEnabled"); + b.Property("TwoFactorEnabled") + .HasColumnType("bit"); b.Property("UserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -74,26 +89,33 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b => { b.Property("UserCode") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") .IsRequired() + .HasColumnType("nvarchar(max)") .HasMaxLength(50000); b.Property("DeviceCode") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Expiration") - .IsRequired(); + .IsRequired() + .HasColumnType("datetime2"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.HasKey("UserCode"); @@ -101,51 +123,64 @@ namespace Company.WebApplication1.Data.Migrations b.HasIndex("DeviceCode") .IsUnique(); + b.HasIndex("Expiration"); + b.ToTable("DeviceCodes"); }); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => { b.Property("Key") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") .IsRequired() + .HasColumnType("nvarchar(max)") .HasMaxLength(50000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("nvarchar(50)") .HasMaxLength(50); b.HasKey("Key"); - b.HasIndex("SubjectId", "ClientId", "Type"); + b.HasIndex("SubjectId", "ClientId", "Type", "Expiration"); b.ToTable("PersistedGrants"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); b.Property("Name") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("NormalizedName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -162,14 +197,18 @@ namespace Company.WebApplication1.Data.Migrations { b.Property("Id") .ValueGeneratedOnAdd() + .HasColumnType("int") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); b.Property("RoleId") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(450)"); b.HasKey("Id"); @@ -182,14 +221,18 @@ namespace Company.WebApplication1.Data.Migrations { b.Property("Id") .ValueGeneratedOnAdd() + .HasColumnType("int") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(450)"); b.HasKey("Id"); @@ -201,15 +244,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("ProviderKey") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("ProviderDisplayName"); + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(450)"); b.HasKey("LoginProvider", "ProviderKey"); @@ -220,9 +267,11 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("nvarchar(450)"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("nvarchar(450)"); b.HasKey("UserId", "RoleId"); @@ -233,15 +282,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("nvarchar(450)"); b.Property("LoginProvider") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("Name") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("Value"); + b.Property("Value") + .HasColumnType("nvarchar(max)"); b.HasKey("UserId", "LoginProvider", "Name"); diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.cs index 4ca64cc6f6..151e8b2206 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.cs +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLServer/00000000000000_CreateIdentitySchema.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; +using System; using Microsoft.EntityFrameworkCore.Migrations; namespace Company.WebApplication1.Data.Migrations @@ -86,7 +85,7 @@ namespace Company.WebApplication1.Data.Migrations columns: table => new { Id = table.Column(nullable: false) - .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), + .Annotation("SqlServer:Identity", "1, 1"), RoleId = table.Column(nullable: false), ClaimType = table.Column(nullable: true), ClaimValue = table.Column(nullable: true) @@ -107,7 +106,7 @@ namespace Company.WebApplication1.Data.Migrations columns: table => new { Id = table.Column(nullable: false) - .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), + .Annotation("SqlServer:Identity", "1, 1"), UserId = table.Column(nullable: false), ClaimType = table.Column(nullable: true), ClaimValue = table.Column(nullable: true) @@ -233,9 +232,14 @@ namespace Company.WebApplication1.Data.Migrations unique: true); migrationBuilder.CreateIndex( - name: "IX_PersistedGrants_SubjectId_ClientId_Type", + name: "IX_DeviceCodes_Expiration", + table: "DeviceCodes", + column: "Expiration"); + + migrationBuilder.CreateIndex( + name: "IX_PersistedGrants_SubjectId_ClientId_Type_Expiration", table: "PersistedGrants", - columns: new[] { "SubjectId", "ClientId", "Type" }); + columns: new[] { "SubjectId", "ClientId", "Type", "Expiration" }); } protected override void Down(MigrationBuilder migrationBuilder) diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLServer/ApplicationDbContextModelSnapshot.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLServer/ApplicationDbContextModelSnapshot.cs index 40ca333c0c..6f19b5d805 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLServer/ApplicationDbContextModelSnapshot.cs +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLServer/ApplicationDbContextModelSnapshot.cs @@ -15,45 +15,60 @@ namespace Company.WebApplication1.Data.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3") + .HasAnnotation("ProductVersion", "3.0.0-preview9.19405.13") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); - b.Property("AccessFailedCount"); + b.Property("AccessFailedCount") + .HasColumnType("int"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); b.Property("Email") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); - b.Property("EmailConfirmed"); + b.Property("EmailConfirmed") + .HasColumnType("bit"); - b.Property("LockoutEnabled"); + b.Property("LockoutEnabled") + .HasColumnType("bit"); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); b.Property("NormalizedEmail") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("NormalizedUserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); - b.Property("PasswordHash"); + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); - b.Property("PhoneNumber"); + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); - b.Property("PhoneNumberConfirmed"); + b.Property("PhoneNumberConfirmed") + .HasColumnType("bit"); - b.Property("SecurityStamp"); + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); - b.Property("TwoFactorEnabled"); + b.Property("TwoFactorEnabled") + .HasColumnType("bit"); b.Property("UserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -72,26 +87,33 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b => { b.Property("UserCode") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") .IsRequired() + .HasColumnType("nvarchar(max)") .HasMaxLength(50000); b.Property("DeviceCode") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Expiration") - .IsRequired(); + .IsRequired() + .HasColumnType("datetime2"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.HasKey("UserCode"); @@ -99,51 +121,64 @@ namespace Company.WebApplication1.Data.Migrations b.HasIndex("DeviceCode") .IsUnique(); + b.HasIndex("Expiration"); + b.ToTable("DeviceCodes"); }); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => { b.Property("Key") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") .IsRequired() + .HasColumnType("nvarchar(max)") .HasMaxLength(50000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("nvarchar(50)") .HasMaxLength(50); b.HasKey("Key"); - b.HasIndex("SubjectId", "ClientId", "Type"); + b.HasIndex("SubjectId", "ClientId", "Type", "Expiration"); b.ToTable("PersistedGrants"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); b.Property("Name") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("NormalizedName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -160,14 +195,18 @@ namespace Company.WebApplication1.Data.Migrations { b.Property("Id") .ValueGeneratedOnAdd() + .HasColumnType("int") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); b.Property("RoleId") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(450)"); b.HasKey("Id"); @@ -180,14 +219,18 @@ namespace Company.WebApplication1.Data.Migrations { b.Property("Id") .ValueGeneratedOnAdd() + .HasColumnType("int") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(450)"); b.HasKey("Id"); @@ -199,15 +242,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("ProviderKey") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("ProviderDisplayName"); + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(450)"); b.HasKey("LoginProvider", "ProviderKey"); @@ -218,9 +265,11 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("nvarchar(450)"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("nvarchar(450)"); b.HasKey("UserId", "RoleId"); @@ -231,15 +280,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("nvarchar(450)"); b.Property("LoginProvider") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("Name") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("Value"); + b.Property("Value") + .HasColumnType("nvarchar(max)"); b.HasKey("UserId", "LoginProvider", "Name"); diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.Designer.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.Designer.cs index fb7b4f9ee3..445f3f946d 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.Designer.cs +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.Designer.cs @@ -16,43 +16,58 @@ namespace Company.WebApplication1.Data.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3"); + .HasAnnotation("ProductVersion", "3.0.0-preview9.19405.13"); modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("TEXT"); - b.Property("AccessFailedCount"); + b.Property("AccessFailedCount") + .HasColumnType("INTEGER"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("TEXT"); b.Property("Email") + .HasColumnType("TEXT") .HasMaxLength(256); - b.Property("EmailConfirmed"); + b.Property("EmailConfirmed") + .HasColumnType("INTEGER"); - b.Property("LockoutEnabled"); + b.Property("LockoutEnabled") + .HasColumnType("INTEGER"); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("TEXT"); b.Property("NormalizedEmail") + .HasColumnType("TEXT") .HasMaxLength(256); b.Property("NormalizedUserName") + .HasColumnType("TEXT") .HasMaxLength(256); - b.Property("PasswordHash"); + b.Property("PasswordHash") + .HasColumnType("TEXT"); - b.Property("PhoneNumber"); + b.Property("PhoneNumber") + .HasColumnType("TEXT"); - b.Property("PhoneNumberConfirmed"); + b.Property("PhoneNumberConfirmed") + .HasColumnType("INTEGER"); - b.Property("SecurityStamp"); + b.Property("SecurityStamp") + .HasColumnType("TEXT"); - b.Property("TwoFactorEnabled"); + b.Property("TwoFactorEnabled") + .HasColumnType("INTEGER"); b.Property("UserName") + .HasColumnType("TEXT") .HasMaxLength(256); b.HasKey("Id"); @@ -70,26 +85,33 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b => { b.Property("UserCode") + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("TEXT"); b.Property("Data") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(50000); b.Property("DeviceCode") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("Expiration") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.Property("SubjectId") + .HasColumnType("TEXT") .HasMaxLength(200); b.HasKey("UserCode"); @@ -97,51 +119,64 @@ namespace Company.WebApplication1.Data.Migrations b.HasIndex("DeviceCode") .IsUnique(); + b.HasIndex("Expiration"); + b.ToTable("DeviceCodes"); }); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => { b.Property("Key") + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("TEXT"); b.Property("Data") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(50000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("TEXT"); b.Property("SubjectId") + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(50); b.HasKey("Key"); - b.HasIndex("SubjectId", "ClientId", "Type"); + b.HasIndex("SubjectId", "ClientId", "Type", "Expiration"); b.ToTable("PersistedGrants"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("TEXT"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("TEXT"); b.Property("Name") + .HasColumnType("TEXT") .HasMaxLength(256); b.Property("NormalizedName") + .HasColumnType("TEXT") .HasMaxLength(256); b.HasKey("Id"); @@ -156,14 +191,18 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("TEXT"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("TEXT"); b.Property("RoleId") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.HasKey("Id"); @@ -175,14 +214,18 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("TEXT"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("TEXT"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.HasKey("Id"); @@ -194,15 +237,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") + .HasColumnType("TEXT") .HasMaxLength(128); b.Property("ProviderKey") + .HasColumnType("TEXT") .HasMaxLength(128); - b.Property("ProviderDisplayName"); + b.Property("ProviderDisplayName") + .HasColumnType("TEXT"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.HasKey("LoginProvider", "ProviderKey"); @@ -213,9 +260,11 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("TEXT"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("TEXT"); b.HasKey("UserId", "RoleId"); @@ -226,15 +275,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("TEXT"); b.Property("LoginProvider") + .HasColumnType("TEXT") .HasMaxLength(128); b.Property("Name") + .HasColumnType("TEXT") .HasMaxLength(128); - b.Property("Value"); + b.Property("Value") + .HasColumnType("TEXT"); b.HasKey("UserId", "LoginProvider", "Name"); diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.cs index 20ae98cb06..19502e4c12 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.cs +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLite/00000000000000_CreateIdentitySchema.cs @@ -230,9 +230,14 @@ namespace Company.WebApplication1.Data.Migrations unique: true); migrationBuilder.CreateIndex( - name: "IX_PersistedGrants_SubjectId_ClientId_Type", + name: "IX_DeviceCodes_Expiration", + table: "DeviceCodes", + column: "Expiration"); + + migrationBuilder.CreateIndex( + name: "IX_PersistedGrants_SubjectId_ClientId_Type_Expiration", table: "PersistedGrants", - columns: new[] { "SubjectId", "ClientId", "Type" }); + columns: new[] { "SubjectId", "ClientId", "Type", "Expiration" }); } protected override void Down(MigrationBuilder migrationBuilder) diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLite/ApplicationDbContextModelSnapshot.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLite/ApplicationDbContextModelSnapshot.cs index f037fed08a..00494952dd 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLite/ApplicationDbContextModelSnapshot.cs +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Data/SQLite/ApplicationDbContextModelSnapshot.cs @@ -14,43 +14,58 @@ namespace Company.WebApplication1.Data.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3"); + .HasAnnotation("ProductVersion", "3.0.0-preview9.19405.13"); modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("TEXT"); - b.Property("AccessFailedCount"); + b.Property("AccessFailedCount") + .HasColumnType("INTEGER"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("TEXT"); b.Property("Email") + .HasColumnType("TEXT") .HasMaxLength(256); - b.Property("EmailConfirmed"); + b.Property("EmailConfirmed") + .HasColumnType("INTEGER"); - b.Property("LockoutEnabled"); + b.Property("LockoutEnabled") + .HasColumnType("INTEGER"); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("TEXT"); b.Property("NormalizedEmail") + .HasColumnType("TEXT") .HasMaxLength(256); b.Property("NormalizedUserName") + .HasColumnType("TEXT") .HasMaxLength(256); - b.Property("PasswordHash"); + b.Property("PasswordHash") + .HasColumnType("TEXT"); - b.Property("PhoneNumber"); + b.Property("PhoneNumber") + .HasColumnType("TEXT"); - b.Property("PhoneNumberConfirmed"); + b.Property("PhoneNumberConfirmed") + .HasColumnType("INTEGER"); - b.Property("SecurityStamp"); + b.Property("SecurityStamp") + .HasColumnType("TEXT"); - b.Property("TwoFactorEnabled"); + b.Property("TwoFactorEnabled") + .HasColumnType("INTEGER"); b.Property("UserName") + .HasColumnType("TEXT") .HasMaxLength(256); b.HasKey("Id"); @@ -68,26 +83,33 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b => { b.Property("UserCode") + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("TEXT"); b.Property("Data") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(50000); b.Property("DeviceCode") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("Expiration") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.Property("SubjectId") + .HasColumnType("TEXT") .HasMaxLength(200); b.HasKey("UserCode"); @@ -95,51 +117,64 @@ namespace Company.WebApplication1.Data.Migrations b.HasIndex("DeviceCode") .IsUnique(); + b.HasIndex("Expiration"); + b.ToTable("DeviceCodes"); }); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => { b.Property("Key") + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(200); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("TEXT"); b.Property("Data") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(50000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("TEXT"); b.Property("SubjectId") + .HasColumnType("TEXT") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("TEXT") .HasMaxLength(50); b.HasKey("Key"); - b.HasIndex("SubjectId", "ClientId", "Type"); + b.HasIndex("SubjectId", "ClientId", "Type", "Expiration"); b.ToTable("PersistedGrants"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("TEXT"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("TEXT"); b.Property("Name") + .HasColumnType("TEXT") .HasMaxLength(256); b.Property("NormalizedName") + .HasColumnType("TEXT") .HasMaxLength(256); b.HasKey("Id"); @@ -154,14 +189,18 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("TEXT"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("TEXT"); b.Property("RoleId") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.HasKey("Id"); @@ -173,14 +212,18 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("TEXT"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("TEXT"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.HasKey("Id"); @@ -192,15 +235,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") + .HasColumnType("TEXT") .HasMaxLength(128); b.Property("ProviderKey") + .HasColumnType("TEXT") .HasMaxLength(128); - b.Property("ProviderDisplayName"); + b.Property("ProviderDisplayName") + .HasColumnType("TEXT"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("TEXT"); b.HasKey("LoginProvider", "ProviderKey"); @@ -211,9 +258,11 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("TEXT"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("TEXT"); b.HasKey("UserId", "RoleId"); @@ -224,15 +273,19 @@ namespace Company.WebApplication1.Data.Migrations modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("TEXT"); b.Property("LoginProvider") + .HasColumnType("TEXT") .HasMaxLength(128); b.Property("Name") + .HasColumnType("TEXT") .HasMaxLength(128); - b.Property("Value"); + b.Property("Value") + .HasColumnType("TEXT"); b.HasKey("UserId", "LoginProvider", "Name"); diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/app.db b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/app.db index a401a042262528ef07722eaad454fd88c4b19705..d28dbed8379b1f0a5fa75a46ac181886511455f8 100644 GIT binary patch delta 281 zcmZo@;Am*zkO>a-$t+1#NXswEO)OC`W)NUtVq$PmP+(wSV4f)B%*xE5XQHq%Wf4Ei zK?eSVn*|lN^RwDAG6!2vzN@c1`L#SRm!+PerHO&5o}qD*!Zrm)HUmb<>FfcFO3dGw zB{vHSyk+8QjFM#+FV|*llArDt%&5;D?^;oiS(I3knV&bkG?>u?MPP3*qq)0|f)YZF zl4hk0ySTkFW20wNTTx2L9UJ=(>I1NN@yaPq~PzT UpoFAMNkIe2qV4%1j1yM_0Bep`4*&oF delta 216 zcmZo@;Am*zkO>a-$t+1#NXswEO)OC`W)NUtWMptqP+(wSV45i7%*w=|rxUO-Wf4Ei zVFv!gn*|ki^0QhqG6$PazN@c1`K3HBhn}IOfrWvdVUxl(1x7XlMw{vE0gOt_Uzu$- z3knD@^EaBwvWq8bGdAXC=B1=oOs@`R)S4a}%;+(FLolPck!F<)ySTM7W1})y+A|{F vCABOwIn_BoCABy{v^cd0#6l92pT0DNQH2F0GyQxBqa+7R&G!5d#)+!|XhT0v diff --git a/src/ProjectTemplates/test/Helpers/Project.cs b/src/ProjectTemplates/test/Helpers/Project.cs index 5d2ffcc237..8331772bf3 100644 --- a/src/ProjectTemplates/test/Helpers/Project.cs +++ b/src/ProjectTemplates/test/Helpers/Project.cs @@ -24,6 +24,9 @@ namespace Templates.Test.Helpers public const string DefaultFramework = "netcoreapp3.0"; + public static bool IsCIEnvironment => typeof(Project).Assembly.GetCustomAttributes() + .Any(a => a.Key == "ContinuousIntegrationBuild"); + public SemaphoreSlim DotNetNewLock { get; set; } public SemaphoreSlim NodeLock { get; set; } public string ProjectName { get; set; } diff --git a/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj b/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj index b0bfda0a57..7b26d044d2 100644 --- a/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj +++ b/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj @@ -57,8 +57,12 @@ <_Parameter1>TestPackageRestorePath <_Parameter2>$(TestPackageRestorePath) + + <_Parameter1>ContinuousIntegrationBuild + <_Parameter2>true + - + $([MSBuild]::NormalizePath('$(OutputPath)$(TestTemplateCreationFolder)')) diff --git a/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs b/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs index c019aad9c7..0c0b37a4b8 100644 --- a/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs +++ b/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs @@ -84,7 +84,7 @@ namespace Templates.Test.SpaTemplateTest Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult)); // localdb is not installed on the CI machines, so skip it. - var shouldVisitFetchData = !useLocalDb; + var shouldVisitFetchData = !(useLocalDb && Project.IsCIEnvironment); if (usesAuth) { From 6b2d9f23f86b221d7c54181ecf65f70a6a6cda2b Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Tue, 13 Aug 2019 09:34:28 +0100 Subject: [PATCH 21/24] Prerender select elements with value; move HtmlRenderer into Mvc.ViewFeatures (#12996) --- ...oft.AspNetCore.Components.netcoreapp3.0.cs | 19 +-- ...ft.AspNetCore.Components.netstandard2.0.cs | 19 +-- .../src/Rendering/ComponentRenderedText.cs | 29 ---- .../Components/src/Rendering/Renderer.cs | 2 +- .../test/Rendering/HtmlRendererTests.cs | 16 --- .../src/Circuits/DefaultCircuitFactory.cs | 2 - .../Server/src/Circuits/RemoteRenderer.cs | 6 +- .../Server/test/Circuits/CircuitHostTest.cs | 4 +- .../test/Circuits/RemoteRendererTest.cs | 67 ++++----- .../Server/test/Circuits/TestCircuitHost.cs | 2 - ....AspNetCore.Components.Server.Tests.csproj | 3 +- .../RazorComponents/ComponentRenderedText.cs | 20 +++ .../src/RazorComponents}/HtmlRenderer.cs | 113 ++++++++------- .../test/RazorComponents/HtmlRendererTest.cs} | 132 ++++++++++++++++-- 14 files changed, 240 insertions(+), 194 deletions(-) delete mode 100644 src/Components/Components/src/Rendering/ComponentRenderedText.cs delete mode 100644 src/Components/Components/test/Rendering/HtmlRendererTests.cs create mode 100644 src/Mvc/Mvc.ViewFeatures/src/RazorComponents/ComponentRenderedText.cs rename src/{Components/Components/src/Rendering => Mvc/Mvc.ViewFeatures/src/RazorComponents}/HtmlRenderer.cs (69%) rename src/{Components/Components/test/Rendering/HtmlRendererTestBase.cs => Mvc/Mvc.ViewFeatures/test/RazorComponents/HtmlRendererTest.cs} (80%) diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs index 468bea98e9..9448a45cb4 100644 --- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs @@ -363,30 +363,12 @@ namespace Microsoft.AspNetCore.Components.CompilerServices } namespace Microsoft.AspNetCore.Components.Rendering { - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ComponentRenderedText - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public int ComponentId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Collections.Generic.IEnumerable Tokens { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } public partial class EventFieldInfo { public EventFieldInfo() { } public int ComponentId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public object FieldValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } } - public partial class HtmlRenderer : Microsoft.AspNetCore.Components.Rendering.Renderer - { - public HtmlRenderer(System.IServiceProvider serviceProvider, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Func htmlEncoder) : base (default(System.IServiceProvider), default(Microsoft.Extensions.Logging.ILoggerFactory)) { } - public override Microsoft.AspNetCore.Components.Dispatcher Dispatcher { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - protected override void HandleException(System.Exception exception) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task RenderComponentAsync(System.Type componentType, Microsoft.AspNetCore.Components.ParameterView initialParameters) { throw null; } - public System.Threading.Tasks.Task RenderComponentAsync(Microsoft.AspNetCore.Components.ParameterView initialParameters) where TComponent : Microsoft.AspNetCore.Components.IComponent { throw null; } - protected override System.Threading.Tasks.Task UpdateDisplayAsync(in Microsoft.AspNetCore.Components.Rendering.RenderBatch renderBatch) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RenderBatch { @@ -405,6 +387,7 @@ namespace Microsoft.AspNetCore.Components.Rendering public virtual System.Threading.Tasks.Task DispatchEventAsync(ulong eventHandlerId, Microsoft.AspNetCore.Components.Rendering.EventFieldInfo fieldInfo, System.EventArgs eventArgs) { throw null; } public void Dispose() { } protected virtual void Dispose(bool disposing) { } + protected Microsoft.AspNetCore.Components.RenderTree.ArrayRange GetCurrentRenderTreeFrames(int componentId) { throw null; } protected abstract void HandleException(System.Exception exception); protected Microsoft.AspNetCore.Components.IComponent InstantiateComponent(System.Type componentType) { throw null; } protected virtual void ProcessPendingRender() { } diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs index 468bea98e9..9448a45cb4 100644 --- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs @@ -363,30 +363,12 @@ namespace Microsoft.AspNetCore.Components.CompilerServices } namespace Microsoft.AspNetCore.Components.Rendering { - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ComponentRenderedText - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public int ComponentId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Collections.Generic.IEnumerable Tokens { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } public partial class EventFieldInfo { public EventFieldInfo() { } public int ComponentId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public object FieldValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } } - public partial class HtmlRenderer : Microsoft.AspNetCore.Components.Rendering.Renderer - { - public HtmlRenderer(System.IServiceProvider serviceProvider, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Func htmlEncoder) : base (default(System.IServiceProvider), default(Microsoft.Extensions.Logging.ILoggerFactory)) { } - public override Microsoft.AspNetCore.Components.Dispatcher Dispatcher { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - protected override void HandleException(System.Exception exception) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task RenderComponentAsync(System.Type componentType, Microsoft.AspNetCore.Components.ParameterView initialParameters) { throw null; } - public System.Threading.Tasks.Task RenderComponentAsync(Microsoft.AspNetCore.Components.ParameterView initialParameters) where TComponent : Microsoft.AspNetCore.Components.IComponent { throw null; } - protected override System.Threading.Tasks.Task UpdateDisplayAsync(in Microsoft.AspNetCore.Components.Rendering.RenderBatch renderBatch) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RenderBatch { @@ -405,6 +387,7 @@ namespace Microsoft.AspNetCore.Components.Rendering public virtual System.Threading.Tasks.Task DispatchEventAsync(ulong eventHandlerId, Microsoft.AspNetCore.Components.Rendering.EventFieldInfo fieldInfo, System.EventArgs eventArgs) { throw null; } public void Dispose() { } protected virtual void Dispose(bool disposing) { } + protected Microsoft.AspNetCore.Components.RenderTree.ArrayRange GetCurrentRenderTreeFrames(int componentId) { throw null; } protected abstract void HandleException(System.Exception exception); protected Microsoft.AspNetCore.Components.IComponent InstantiateComponent(System.Type componentType) { throw null; } protected virtual void ProcessPendingRender() { } diff --git a/src/Components/Components/src/Rendering/ComponentRenderedText.cs b/src/Components/Components/src/Rendering/ComponentRenderedText.cs deleted file mode 100644 index 400fda7643..0000000000 --- a/src/Components/Components/src/Rendering/ComponentRenderedText.cs +++ /dev/null @@ -1,29 +0,0 @@ -// 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 System.Collections.Generic; - -namespace Microsoft.AspNetCore.Components.Rendering -{ - /// - /// Represents the result of rendering a component into static html. - /// - public readonly struct ComponentRenderedText - { - internal ComponentRenderedText(int componentId, IEnumerable tokens) - { - ComponentId = componentId; - Tokens = tokens; - } - - /// - /// Gets the id associated with the component. - /// - public int ComponentId { get; } - - /// - /// Gets the sequence of tokens that when concatenated represent the html for the rendered component. - /// - public IEnumerable Tokens { get; } - } -} diff --git a/src/Components/Components/src/Rendering/Renderer.cs b/src/Components/Components/src/Rendering/Renderer.cs index 1ca8636192..d1fdfa35ff 100644 --- a/src/Components/Components/src/Rendering/Renderer.cs +++ b/src/Components/Components/src/Rendering/Renderer.cs @@ -93,7 +93,7 @@ namespace Microsoft.AspNetCore.Components.Rendering /// /// The id for the component. /// The representing the current render tree. - private protected ArrayRange GetCurrentRenderTreeFrames(int componentId) => GetRequiredComponentState(componentId).CurrentRenderTree.GetFrames(); + protected ArrayRange GetCurrentRenderTreeFrames(int componentId) => GetRequiredComponentState(componentId).CurrentRenderTree.GetFrames(); /// /// Performs the first render for a root component, waiting for this component and all diff --git a/src/Components/Components/test/Rendering/HtmlRendererTests.cs b/src/Components/Components/test/Rendering/HtmlRendererTests.cs deleted file mode 100644 index c02e835751..0000000000 --- a/src/Components/Components/test/Rendering/HtmlRendererTests.cs +++ /dev/null @@ -1,16 +0,0 @@ -// 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 System; -using Microsoft.Extensions.Logging.Abstractions; - -namespace Microsoft.AspNetCore.Components.Rendering -{ - public class HtmlRendererTests : HtmlRendererTestBase - { - protected override HtmlRenderer GetHtmlRenderer(IServiceProvider serviceProvider) - { - return new HtmlRenderer(serviceProvider, NullLoggerFactory.Instance, _encoder); - } - } -} diff --git a/src/Components/Server/src/Circuits/DefaultCircuitFactory.cs b/src/Components/Server/src/Circuits/DefaultCircuitFactory.cs index b5c14b0911..b51f122278 100644 --- a/src/Components/Server/src/Circuits/DefaultCircuitFactory.cs +++ b/src/Components/Server/src/Circuits/DefaultCircuitFactory.cs @@ -50,7 +50,6 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits var components = ResolveComponentMetadata(httpContext); var scope = _scopeFactory.CreateScope(); - var encoder = scope.ServiceProvider.GetRequiredService(); var jsRuntime = (RemoteJSRuntime)scope.ServiceProvider.GetRequiredService(); var componentContext = (RemoteComponentContext)scope.ServiceProvider.GetRequiredService(); jsRuntime.Initialize(client); @@ -76,7 +75,6 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits _options, jsRuntime, client, - encoder, _loggerFactory.CreateLogger()); var circuitHandlers = scope.ServiceProvider.GetServices() diff --git a/src/Components/Server/src/Circuits/RemoteRenderer.cs b/src/Components/Server/src/Circuits/RemoteRenderer.cs index f2dae7dd0d..4c77968d42 100644 --- a/src/Components/Server/src/Circuits/RemoteRenderer.cs +++ b/src/Components/Server/src/Circuits/RemoteRenderer.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Concurrent; using System.Linq; -using System.Text.Encodings.Web; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Components.Rendering; @@ -17,7 +16,7 @@ using Microsoft.JSInterop; namespace Microsoft.AspNetCore.Components.Web.Rendering { - internal class RemoteRenderer : HtmlRenderer + internal class RemoteRenderer : Renderer { private static readonly Task CanceledTask = Task.FromCanceled(new CancellationToken(canceled: true)); @@ -43,9 +42,8 @@ namespace Microsoft.AspNetCore.Components.Web.Rendering CircuitOptions options, IJSRuntime jsRuntime, CircuitClientProxy client, - HtmlEncoder encoder, ILogger logger) - : base(serviceProvider, loggerFactory, encoder.Encode) + : base(serviceProvider, loggerFactory) { _jsRuntime = jsRuntime; _client = client; diff --git a/src/Components/Server/test/Circuits/CircuitHostTest.cs b/src/Components/Server/test/Circuits/CircuitHostTest.cs index 9a1973e2f4..f85a408803 100644 --- a/src/Components/Server/test/Circuits/CircuitHostTest.cs +++ b/src/Components/Server/test/Circuits/CircuitHostTest.cs @@ -5,10 +5,8 @@ using System; using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Text.Encodings.Web; using System.Threading; using System.Threading.Tasks; -using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.Web.Rendering; using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.DependencyInjection; @@ -238,7 +236,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits private class TestRemoteRenderer : RemoteRenderer { public TestRemoteRenderer(IServiceProvider serviceProvider, IJSRuntime jsRuntime, IClientProxy client) - : base(serviceProvider, NullLoggerFactory.Instance, new CircuitOptions(), jsRuntime, new CircuitClientProxy(client, "connection"), HtmlEncoder.Default, NullLogger.Instance) + : base(serviceProvider, NullLoggerFactory.Instance, new CircuitOptions(), jsRuntime, new CircuitClientProxy(client, "connection"), NullLogger.Instance) { } diff --git a/src/Components/Server/test/Circuits/RemoteRendererTest.cs b/src/Components/Server/test/Circuits/RemoteRendererTest.cs index d50e5fa5e6..386ea99f28 100644 --- a/src/Components/Server/test/Circuits/RemoteRendererTest.cs +++ b/src/Components/Server/test/Circuits/RemoteRendererTest.cs @@ -4,10 +4,8 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Text.Encodings.Web; using System.Threading; using System.Threading.Tasks; -using Microsoft.AspNetCore.Components.Rendering; using Microsoft.AspNetCore.Components.Server; using Microsoft.AspNetCore.Components.Server.Circuits; using Microsoft.AspNetCore.SignalR; @@ -20,23 +18,18 @@ using Xunit; namespace Microsoft.AspNetCore.Components.Web.Rendering { - public class RemoteRendererTest : HtmlRendererTestBase + public class RemoteRendererTest { // Nothing should exceed the timeout in a successful run of the the tests, this is just here to catch // failures. private static readonly TimeSpan Timeout = Debugger.IsAttached ? System.Threading.Timeout.InfiniteTimeSpan : TimeSpan.FromSeconds(10); - protected override HtmlRenderer GetHtmlRenderer(IServiceProvider serviceProvider) - { - return GetRemoteRenderer(serviceProvider, new CircuitClientProxy()); - } - [Fact] public void WritesAreBufferedWhenTheClientIsOffline() { // Arrange var serviceProvider = new ServiceCollection().BuildServiceProvider(); - var renderer = (RemoteRenderer)GetHtmlRenderer(serviceProvider); + var renderer = GetRemoteRenderer(serviceProvider); var component = new TestComponent(builder => { builder.OpenElement(0, "my element"); @@ -57,7 +50,7 @@ namespace Microsoft.AspNetCore.Components.Web.Rendering public void NotAcknowledgingRenders_ProducesBatches_UpToTheLimit() { var serviceProvider = new ServiceCollection().BuildServiceProvider(); - var renderer = (RemoteRenderer)GetHtmlRenderer(serviceProvider); + var renderer = GetRemoteRenderer(serviceProvider); var component = new TestComponent(builder => { builder.OpenElement(0, "my element"); @@ -81,7 +74,7 @@ namespace Microsoft.AspNetCore.Components.Web.Rendering public async Task NoNewBatchesAreCreated_WhenThereAreNoPendingRenderRequestsFromComponents() { var serviceProvider = new ServiceCollection().BuildServiceProvider(); - var renderer = (RemoteRenderer)GetHtmlRenderer(serviceProvider); + var renderer = GetRemoteRenderer(serviceProvider); var component = new TestComponent(builder => { builder.OpenElement(0, "my element"); @@ -107,7 +100,7 @@ namespace Microsoft.AspNetCore.Components.Web.Rendering public async Task ProducesNewBatch_WhenABatchGetsAcknowledged() { var serviceProvider = new ServiceCollection().BuildServiceProvider(); - var renderer = (RemoteRenderer)GetHtmlRenderer(serviceProvider); + var renderer = GetRemoteRenderer(serviceProvider); var i = 0; var component = new TestComponent(builder => { @@ -215,7 +208,7 @@ namespace Microsoft.AspNetCore.Components.Web.Rendering .Returns((n, v, t) => (long)v[1] == 2 ? firstBatchTCS.Task : secondBatchTCS.Task); // This produces the initial batch (id = 2) - var result = await renderer.RenderComponentAsync( + await renderer.RenderComponentAsync( ParameterView.FromDictionary(new Dictionary { [nameof(AutoParameterTestComponent.Content)] = initialContent, @@ -278,7 +271,7 @@ namespace Microsoft.AspNetCore.Components.Web.Rendering .Returns((n, v, t) => (long)v[1] == 2 ? firstBatchTCS.Task : secondBatchTCS.Task); // This produces the initial batch (id = 2) - var result = await renderer.RenderComponentAsync( + await renderer.RenderComponentAsync( ParameterView.FromDictionary(new Dictionary { [nameof(AutoParameterTestComponent.Content)] = initialContent, @@ -341,7 +334,7 @@ namespace Microsoft.AspNetCore.Components.Web.Rendering var trigger = new Trigger(); // This produces the initial batch (id = 2) - var result = await renderer.RenderComponentAsync( + await renderer.RenderComponentAsync( ParameterView.FromDictionary(new Dictionary { [nameof(AutoParameterTestComponent.Content)] = initialContent, @@ -398,7 +391,7 @@ namespace Microsoft.AspNetCore.Components.Web.Rendering var trigger = new Trigger(); // This produces the initial batch (id = 2) - var result = await renderer.RenderComponentAsync( + await renderer.RenderComponentAsync( ParameterView.FromDictionary(new Dictionary { [nameof(AutoParameterTestComponent.Content)] = initialContent, @@ -432,27 +425,7 @@ namespace Microsoft.AspNetCore.Components.Web.Rendering exception.Message); } - [Fact] - public async Task PrerendersMultipleComponentsSuccessfully() - { - // Arrange - var serviceProvider = new ServiceCollection().BuildServiceProvider(); - - var renderer = GetRemoteRenderer( - serviceProvider, - new CircuitClientProxy()); - - // Act - var first = await renderer.RenderComponentAsync(ParameterView.Empty); - var second = await renderer.RenderComponentAsync(ParameterView.Empty); - - // Assert - Assert.Equal(0, first.ComponentId); - Assert.Equal(1, second.ComponentId); - Assert.Equal(2, renderer._unacknowledgedRenderBatches.Count); - } - - private RemoteRenderer GetRemoteRenderer(IServiceProvider serviceProvider, CircuitClientProxy circuitClientProxy) + private TestRemoteRenderer GetRemoteRenderer(IServiceProvider serviceProvider, CircuitClientProxy circuitClient = null) { var jsRuntime = new Mock(); jsRuntime.Setup(r => r.InvokeAsync( @@ -462,16 +435,30 @@ namespace Microsoft.AspNetCore.Components.Web.Rendering It.IsAny())) .ReturnsAsync(Task.FromResult(null)); - return new RemoteRenderer( + return new TestRemoteRenderer( serviceProvider, NullLoggerFactory.Instance, new CircuitOptions(), jsRuntime.Object, - circuitClientProxy, - HtmlEncoder.Default, + circuitClient ?? new CircuitClientProxy(), NullLogger.Instance); } + private class TestRemoteRenderer : RemoteRenderer + { + public TestRemoteRenderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory, CircuitOptions options, IJSRuntime jsRuntime, CircuitClientProxy client, ILogger logger) + : base(serviceProvider, loggerFactory, options, jsRuntime, client, logger) + { + } + + public async Task RenderComponentAsync(ParameterView initialParameters) + { + var component = InstantiateComponent(typeof(TComponent)); + var componentId = AssignRootComponentId(component); + await RenderRootComponentAsync(componentId, initialParameters); + } + } + private class TestComponent : IComponent, IHandleAfterRender { private RenderHandle _renderHandle; diff --git a/src/Components/Server/test/Circuits/TestCircuitHost.cs b/src/Components/Server/test/Circuits/TestCircuitHost.cs index 8e04f6ca2d..e0a2e0bd54 100644 --- a/src/Components/Server/test/Circuits/TestCircuitHost.cs +++ b/src/Components/Server/test/Circuits/TestCircuitHost.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.Text.Encodings.Web; using Microsoft.AspNetCore.Components.Web.Rendering; using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.DependencyInjection; @@ -40,7 +39,6 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits new CircuitOptions(), jsRuntime, clientProxy, - HtmlEncoder.Default, NullLogger.Instance); } diff --git a/src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj b/src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj index bf4040312e..c80f6fc2fb 100644 --- a/src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj +++ b/src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.0 @@ -14,7 +14,6 @@ - diff --git a/src/Mvc/Mvc.ViewFeatures/src/RazorComponents/ComponentRenderedText.cs b/src/Mvc/Mvc.ViewFeatures/src/RazorComponents/ComponentRenderedText.cs new file mode 100644 index 0000000000..92274e38c3 --- /dev/null +++ b/src/Mvc/Mvc.ViewFeatures/src/RazorComponents/ComponentRenderedText.cs @@ -0,0 +1,20 @@ +// 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 System.Collections.Generic; + +namespace Microsoft.AspNetCore.Components.Rendering +{ + internal readonly struct ComponentRenderedText + { + public ComponentRenderedText(int componentId, IEnumerable tokens) + { + ComponentId = componentId; + Tokens = tokens; + } + + public int ComponentId { get; } + + public IEnumerable Tokens { get; } + } +} diff --git a/src/Components/Components/src/Rendering/HtmlRenderer.cs b/src/Mvc/Mvc.ViewFeatures/src/RazorComponents/HtmlRenderer.cs similarity index 69% rename from src/Components/Components/src/Rendering/HtmlRenderer.cs rename to src/Mvc/Mvc.ViewFeatures/src/RazorComponents/HtmlRenderer.cs index 5eb2e71095..5075e8a893 100644 --- a/src/Components/Components/src/Rendering/HtmlRenderer.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/RazorComponents/HtmlRenderer.cs @@ -12,10 +12,7 @@ using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Components.Rendering { - /// - /// A that produces HTML. - /// - public class HtmlRenderer : Renderer + internal class HtmlRenderer : Renderer { private static readonly HashSet SelfClosingElements = new HashSet(StringComparer.OrdinalIgnoreCase) { @@ -26,12 +23,6 @@ namespace Microsoft.AspNetCore.Components.Rendering private readonly Func _htmlEncoder; - /// - /// Initializes a new instance of . - /// - /// The to use to instantiate components. - /// The . - /// A that will HTML encode the given string. public HtmlRenderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory, Func htmlEncoder) : base(serviceProvider, loggerFactory) { @@ -58,30 +49,16 @@ namespace Microsoft.AspNetCore.Components.Rendering return CanceledRenderTask; } - /// - /// Renders a component into a sequence of fragments that represent the textual representation - /// of the HTML produced by the component. - /// - /// The type of the . - /// A with the initial parameters to render the component. - /// A that on completion returns a sequence of fragments that represent the HTML text of the component. public async Task RenderComponentAsync(Type componentType, ParameterView initialParameters) { var (componentId, frames) = await CreateInitialRenderAsync(componentType, initialParameters); - var result = new List(); - var newPosition = RenderFrames(result, frames, 0, frames.Count); + var context = new HtmlRenderingContext(); + var newPosition = RenderFrames(context, frames, 0, frames.Count); Debug.Assert(newPosition == frames.Count); - return new ComponentRenderedText(componentId, result); + return new ComponentRenderedText(componentId, context.Result); } - /// - /// Renders a component into a sequence of fragments that represent the textual representation - /// of the HTML produced by the component. - /// - /// The type of the . - /// A with the initial parameters to render the component. - /// A that on completion returns a sequence of fragments that represent the HTML text of the component. public Task RenderComponentAsync(ParameterView initialParameters) where TComponent : IComponent { return RenderComponentAsync(typeof(TComponent), initialParameters); @@ -91,13 +68,13 @@ namespace Microsoft.AspNetCore.Components.Rendering protected override void HandleException(Exception exception) => ExceptionDispatchInfo.Capture(exception).Throw(); - private int RenderFrames(List result, ArrayRange frames, int position, int maxElements) + private int RenderFrames(HtmlRenderingContext context, ArrayRange frames, int position, int maxElements) { var nextPosition = position; var endPosition = position + maxElements; while (position < endPosition) { - nextPosition = RenderCore(result, frames, position, maxElements); + nextPosition = RenderCore(context, frames, position); if (position == nextPosition) { throw new InvalidOperationException("We didn't consume any input."); @@ -109,28 +86,27 @@ namespace Microsoft.AspNetCore.Components.Rendering } private int RenderCore( - List result, + HtmlRenderingContext context, ArrayRange frames, - int position, - int length) + int position) { ref var frame = ref frames.Array[position]; switch (frame.FrameType) { case RenderTreeFrameType.Element: - return RenderElement(result, frames, position); + return RenderElement(context, frames, position); case RenderTreeFrameType.Attribute: - return RenderAttributes(result, frames, position, 1); + throw new InvalidOperationException($"Attributes should only be encountered within {nameof(RenderElement)}"); case RenderTreeFrameType.Text: - result.Add(_htmlEncoder(frame.TextContent)); + context.Result.Add(_htmlEncoder(frame.TextContent)); return ++position; case RenderTreeFrameType.Markup: - result.Add(frame.MarkupContent); + context.Result.Add(frame.MarkupContent); return ++position; case RenderTreeFrameType.Component: - return RenderChildComponent(result, frames, position); + return RenderChildComponent(context, frames, position); case RenderTreeFrameType.Region: - return RenderFrames(result, frames, position + 1, frame.RegionSubtreeLength - 1); + return RenderFrames(context, frames, position + 1, frame.RegionSubtreeLength - 1); case RenderTreeFrameType.ElementReferenceCapture: case RenderTreeFrameType.ComponentReferenceCapture: return ++position; @@ -140,30 +116,57 @@ namespace Microsoft.AspNetCore.Components.Rendering } private int RenderChildComponent( - List result, + HtmlRenderingContext context, ArrayRange frames, int position) { ref var frame = ref frames.Array[position]; var childFrames = GetCurrentRenderTreeFrames(frame.ComponentId); - RenderFrames(result, childFrames, 0, childFrames.Count); + RenderFrames(context, childFrames, 0, childFrames.Count); return position + frame.ComponentSubtreeLength; } private int RenderElement( - List result, + HtmlRenderingContext context, ArrayRange frames, int position) { ref var frame = ref frames.Array[position]; + var result = context.Result; result.Add("<"); result.Add(frame.ElementName); - var afterAttributes = RenderAttributes(result, frames, position + 1, frame.ElementSubtreeLength - 1); + var afterAttributes = RenderAttributes(context, frames, position + 1, frame.ElementSubtreeLength - 1, out var capturedValueAttribute); + + // When we see an " + + @"" + + @"" + + "" + + @"" + + "

"; + var serviceProvider = new ServiceCollection().AddSingleton(new RenderFragment(rtb => + { + rtb.OpenElement(0, "p"); + rtb.OpenElement(1, "select"); + rtb.AddAttribute(2, "unrelated-attribute-before", "a"); + rtb.AddAttribute(3, "value", "b"); + rtb.AddAttribute(4, "unrelated-attribute-after", "c"); + + foreach (var optionValue in new[] { "a", "b", "c"}) + { + rtb.OpenElement(5, "option"); + rtb.AddAttribute(6, "unrelated-attribute", "a"); + rtb.AddAttribute(7, "value", optionValue); + rtb.AddContent(8, $"Pick value {optionValue}"); + rtb.CloseElement(); // option + } + + rtb.CloseElement(); // select + + rtb.OpenElement(9, "option"); // To show other value-matching options don't get marked as selected + rtb.AddAttribute(10, "value", "b"); + rtb.AddContent(11, "unrelated option"); + rtb.CloseElement(); // option + + rtb.CloseElement(); // p + })).BuildServiceProvider(); + + var htmlRenderer = GetHtmlRenderer(serviceProvider); + + // Act + var result = GetResult(htmlRenderer.Dispatcher.InvokeAsync(() => htmlRenderer.RenderComponentAsync(ParameterView.Empty))); + + // Assert + Assert.Equal(expectedHtml, string.Concat(result)); + } + + [Fact] + public void RenderComponentAsync_MarksSelectedOptionsAsSelected_WithOptGroups() + { + // Arrange + var expectedHtml = + @""; + var serviceProvider = new ServiceCollection().AddSingleton(new RenderFragment(rtb => + { + rtb.OpenElement(0, "select"); + rtb.AddAttribute(1, "value", "beta"); + + foreach (var optionValue in new[] { "alpha", "beta", "gamma" }) + { + rtb.OpenElement(2, "optgroup"); + rtb.OpenElement(3, "option"); + rtb.AddAttribute(4, "value", optionValue); + rtb.AddContent(5, optionValue); + rtb.CloseElement(); // option + rtb.CloseElement(); // optgroup + } + + rtb.CloseElement(); // select + })).BuildServiceProvider(); + + var htmlRenderer = GetHtmlRenderer(serviceProvider); + + // Act + var result = GetResult(htmlRenderer.Dispatcher.InvokeAsync(() => htmlRenderer.RenderComponentAsync(ParameterView.Empty))); + + // Assert + Assert.Equal(expectedHtml, string.Concat(result)); + } [Fact] public void RenderComponentAsync_CanRenderComponentAsyncWithChildrenComponents() @@ -358,11 +441,11 @@ namespace Microsoft.AspNetCore.Components.Rendering // Act var result = GetResult(htmlRenderer.Dispatcher.InvokeAsync(() => htmlRenderer.RenderComponentAsync( - new ParameterView(new[] { - RenderTreeFrame.Element(0,string.Empty), - RenderTreeFrame.Attribute(1,"update",change), - RenderTreeFrame.Attribute(2,"value",5) - }, 0)))); + ParameterView.FromDictionary(new Dictionary + { + { "update", change }, + { "value", 5 } + })))); // Assert Assert.Equal(expectedHtml, result); @@ -499,6 +582,31 @@ namespace Microsoft.AspNetCore.Components.Rendering Assert.Equal(expectedHtml, result.Tokens); } + [Fact] + public async Task PrerendersMultipleComponentsSuccessfully() + { + // Arrange + var serviceProvider = new ServiceCollection().AddSingleton(new RenderFragment(rtb => + { + rtb.OpenElement(0, "p"); + rtb.AddMarkupContent(1, "Hello world!"); + rtb.CloseElement(); + })).BuildServiceProvider(); + var renderer = GetHtmlRenderer(serviceProvider); + + // Act + var first = await renderer.Dispatcher.InvokeAsync(() => renderer.RenderComponentAsync(ParameterView.Empty)); + var second = await renderer.Dispatcher.InvokeAsync(() => renderer.RenderComponentAsync(ParameterView.Empty)); + + // Assert + Assert.Equal(0, first.ComponentId); + Assert.Equal(1, second.ComponentId); + } + + private HtmlRenderer GetHtmlRenderer(IServiceProvider serviceProvider) + { + return new HtmlRenderer(serviceProvider, NullLoggerFactory.Instance, _encoder); + } private class NestedAsyncComponent : ComponentBase { From c80f7d1dd951d6a42f87368fe7b094f3f7b2f44e Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 13 Aug 2019 12:33:23 -0700 Subject: [PATCH 22/24] Remove LangVersion from server-side Blazor project template (#13094) Fixes https://github.com/aspnet/AspNetCore/issues/9168 --- .../Web.ProjectTemplates/BlazorServerWeb-CSharp.csproj.in | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ProjectTemplates/Web.ProjectTemplates/BlazorServerWeb-CSharp.csproj.in b/src/ProjectTemplates/Web.ProjectTemplates/BlazorServerWeb-CSharp.csproj.in index c11f4b0bd4..fd683b4b20 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/BlazorServerWeb-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/BlazorServerWeb-CSharp.csproj.in @@ -2,7 +2,6 @@ netcoreapp3.0 - 7.3 aspnet-BlazorServerWeb_CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502 0 1 From 9bd027aa999ea08dfc2b82025002210b59b4ab34 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 13 Aug 2019 12:49:10 -0700 Subject: [PATCH 23/24] Make Partial on PageBase and PageModel work correctly (#13013) * Make Partial on PageBase and PageModel work correctly Fixes https://github.com/aspnet/AspNetCore/issues/10438 --- ...AspNetCore.Mvc.RazorPages.netcoreapp3.0.cs | 2 + src/Mvc/Mvc.RazorPages/src/PageBase.cs | 108 +++++++++--------- src/Mvc/Mvc.RazorPages/src/PageModel.cs | 108 +++++++++--------- src/Mvc/Mvc.RazorPages/test/PageModelTest.cs | 15 ++- src/Mvc/Mvc.RazorPages/test/PageTest.cs | 17 ++- .../samples/MvcSandbox/Pages/PagesHome.cshtml | 2 +- .../PagesHome.cshtml.cs} | 2 +- .../Mvc.FunctionalTests/RazorPagesTest.cs | 32 +++++- .../Models/RenderPartialModel.cs | 10 ++ .../PageWithoutModelRenderPartial.cshtml | 6 + .../RazorPagesWebSite/RenderPartial.cshtml | 7 ++ .../RazorPagesWebSite/RenderPartial.cshtml.cs | 20 ++++ .../RenderPartialWithModel.cs | 15 --- .../RenderPartialWithModel.cshtml | 4 - .../RenderPartialWithoutModel.cshtml | 5 - .../Views/Shared/_PartialWithoutModel.cshtml | 1 - .../Views/Shared/_RenderPartial.cshtml | 4 + ....cshtml => _RenderPartialPageModel.cshtml} | 2 +- 18 files changed, 212 insertions(+), 148 deletions(-) rename src/Mvc/samples/MvcSandbox/{Models/TestModel.cs => Pages/PagesHome.cshtml.cs} (92%) create mode 100644 src/Mvc/test/WebSites/RazorPagesWebSite/Models/RenderPartialModel.cs create mode 100644 src/Mvc/test/WebSites/RazorPagesWebSite/PageWithoutModelRenderPartial.cshtml create mode 100644 src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartial.cshtml create mode 100644 src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartial.cshtml.cs delete mode 100644 src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartialWithModel.cs delete mode 100644 src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartialWithModel.cshtml delete mode 100644 src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartialWithoutModel.cshtml delete mode 100644 src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/_PartialWithoutModel.cshtml create mode 100644 src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/_RenderPartial.cshtml rename src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/{_PartialWithModel.cshtml => _RenderPartialPageModel.cshtml} (50%) diff --git a/src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.netcoreapp3.0.cs b/src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.netcoreapp3.0.cs index 4043d5eded..e8959d832a 100644 --- a/src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.netcoreapp3.0.cs +++ b/src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.netcoreapp3.0.cs @@ -368,6 +368,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages { protected PageBase() { } public Microsoft.AspNetCore.Http.HttpContext HttpContext { get { throw null; } } + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider MetadataProvider { get { throw null; } set { } } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get { throw null; } } public Microsoft.AspNetCore.Mvc.RazorPages.PageContext PageContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public Microsoft.AspNetCore.Http.HttpRequest Request { get { throw null; } } @@ -500,6 +501,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages { protected PageModel() { } public Microsoft.AspNetCore.Http.HttpContext HttpContext { get { throw null; } } + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider MetadataProvider { get { throw null; } set { } } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get { throw null; } } [Microsoft.AspNetCore.Mvc.RazorPages.PageContextAttribute] public Microsoft.AspNetCore.Mvc.RazorPages.PageContext PageContext { get { throw null; } set { } } diff --git a/src/Mvc/Mvc.RazorPages/src/PageBase.cs b/src/Mvc/Mvc.RazorPages/src/PageBase.cs index 0ae4993b35..32f6810281 100644 --- a/src/Mvc/Mvc.RazorPages/src/PageBase.cs +++ b/src/Mvc/Mvc.RazorPages/src/PageBase.cs @@ -13,6 +13,7 @@ using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.AspNetCore.Mvc.Razor; using Microsoft.AspNetCore.Mvc.Rendering; +using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Net.Http.Headers; @@ -61,6 +62,19 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// public ModelStateDictionary ModelState => PageContext?.ModelState; + /// + /// Gets or sets the . + /// + public IModelMetadataProvider MetadataProvider + { + get + { + _metadataProvider ??= HttpContext?.RequestServices?.GetRequiredService(); + return _metadataProvider; + } + set => _metadataProvider = value ?? throw new ArgumentNullException(nameof(value)); + } + private IObjectModelValidator ObjectValidator { get @@ -74,19 +88,6 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } } - private IModelMetadataProvider MetadataProvider - { - get - { - if (_metadataProvider == null) - { - _metadataProvider = HttpContext?.RequestServices?.GetRequiredService(); - } - - return _metadataProvider; - } - } - private IModelBinderFactory ModelBinderFactory { get @@ -216,7 +217,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => Content(content, (MediaTypeHeaderValue)null); /// - /// Creates a object with by specifying a + /// Creates a object with by specifying a /// string and a content type. /// /// The content to write to the response. @@ -226,7 +227,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => Content(content, MediaTypeHeaderValue.Parse(contentType)); /// - /// Creates a object with by specifying a + /// Creates a object with by specifying a /// string, a , and . /// /// The content to write to the response. @@ -245,7 +246,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Creates a object with by specifying a + /// Creates a object with by specifying a /// string and a . /// /// The content to write to the response. @@ -292,14 +293,14 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// challenge. /// The created for the response. /// - /// Some authentication schemes, such as cookies, will convert to + /// Some authentication schemes, such as cookies, will convert to /// a redirect to show a login page. /// public virtual ForbidResult Forbid(AuthenticationProperties properties) => new ForbidResult(properties); /// - /// Creates a ( by default) with the + /// Creates a ( by default) with the /// specified authentication schemes and . /// /// used to perform the authentication @@ -405,7 +406,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => new PhysicalFileResult(physicalPath, contentType) { FileDownloadName = fileDownloadName }; /// - /// Creates a object that redirects + /// Creates a object that redirects /// () to the specified local . /// /// The local URL to redirect to. @@ -438,7 +439,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// /// Creates a object with set to - /// false and set to true + /// false and set to true /// () using the specified . /// /// The local URL to redirect to. @@ -455,7 +456,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// /// Creates a object with set to - /// true and set to true + /// true and set to true /// () using the specified . /// /// The local URL to redirect to. @@ -527,7 +528,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// /// Creates a object with set to false - /// and set to true () + /// and set to true () /// using the specified . /// /// The URL to redirect to. @@ -544,7 +545,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// /// Creates a object with set to true - /// and set to true () + /// and set to true () /// using the specified . /// /// The URL to redirect to. @@ -568,7 +569,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => RedirectToAction(actionName, routeValues: null); /// - /// Redirects () to the specified action using the + /// Redirects () to the specified action using the /// and . /// /// The name of the action. @@ -578,7 +579,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => RedirectToAction(actionName, controllerName: null, routeValues: routeValues); /// - /// Redirects () to the specified action using the + /// Redirects () to the specified action using the /// and the . /// /// The name of the action. @@ -632,15 +633,15 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => new RedirectToActionResult(actionName, controllerName, routeValues, fragment); /// - /// Redirects () to the specified action with - /// set to false and - /// set to true, using the specified , , + /// Redirects () to the specified action with + /// set to false and + /// set to true, using the specified , , /// , and . /// /// The name of the action. /// The name of the controller. /// The route data to use for generating the URL. - /// The fragment to add to the URL. + /// The fragment to add to the URL. /// The created for the response. public virtual RedirectToActionResult RedirectToActionPreserveMethod( string actionName = null, @@ -658,7 +659,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified action with + /// Redirects () to the specified action with /// set to true using the specified . /// /// The name of the action. @@ -669,8 +670,8 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified action with - /// set to true using the specified + /// Redirects () to the specified action with + /// set to true using the specified /// and . /// /// The name of the action. @@ -682,8 +683,8 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified action with - /// set to true using the specified + /// Redirects () to the specified action with + /// set to true using the specified /// and . /// /// The name of the action. @@ -695,7 +696,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified action with + /// Redirects () to the specified action with /// set to true using the specified , /// , and . /// @@ -712,7 +713,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified action with + /// Redirects () to the specified action with /// set to true using the specified , /// , and . /// @@ -729,7 +730,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified action with + /// Redirects () to the specified action with /// set to true using the specified , /// , , and . /// @@ -753,16 +754,16 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified action with + /// Redirects () to the specified action with /// set to true and - /// set to true, using the specified , , + /// set to true, using the specified , , /// , and . /// /// The name of the action. /// The name of the controller. /// The route data to use for generating the URL. /// The fragment to add to the URL. - /// The created for the response. + /// The created for the response. public virtual RedirectToActionResult RedirectToActionPermanentPreserveMethod( string actionName = null, string controllerName = null, @@ -839,14 +840,14 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified route with + /// Redirects () to the specified route with /// set to false and /// set to true, using the specified , , and . /// /// The name of the route. /// The route data to use for generating the URL. /// The fragment to add to the URL. - /// The created for the response. + /// The created for the response. public virtual RedirectToRouteResult RedirectToRoutePreserveMethod( string routeName = null, object routeValues = null, @@ -861,7 +862,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified route with + /// Redirects () to the specified route with /// set to true using the specified . /// /// The name of the route. @@ -872,7 +873,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified route with + /// Redirects () to the specified route with /// set to true using the specified . /// /// The parameters for a route. @@ -896,7 +897,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified route with + /// Redirects () to the specified route with /// set to true using the specified /// and . /// @@ -931,7 +932,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// The name of the route. /// The route data to use for generating the URL. /// The fragment to add to the URL. - /// The created for the response. + /// The created for the response. public virtual RedirectToRouteResult RedirectToRoutePermanentPreserveMethod( string routeName = null, object routeValues = null, @@ -1074,7 +1075,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => new RedirectToPageResult(pageName, pageHandler, routeValues, permanent: true, fragment: fragment); /// - /// Redirects () to the specified page with + /// Redirects () to the specified page with /// set to false and /// set to true, using the specified , , and . /// @@ -1082,7 +1083,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// The page handler to redirect to. /// The route data to use for generating the URL. /// The fragment to add to the URL. - /// The created for the response. + /// The created for the response. public virtual RedirectToPageResult RedirectToPagePreserveMethod( string pageName = null, string pageHandler = null, @@ -1107,7 +1108,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// The page handler to redirect to. /// The route data to use for generating the URL. /// The fragment to add to the URL. - /// The created for the response. + /// The created for the response. public virtual RedirectToPageResult RedirectToPagePermanentPreserveMethod( string pageName = null, string pageHandler = null, @@ -1206,12 +1207,17 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// The created object for the response. public virtual PartialViewResult Partial(string viewName, object model) { - ViewContext.ViewData.Model = model; + // ViewContext.ViewData is an instance of ViewDataDictionary, but we need an instance + // of ViewDataDictionary. + var viewData = new ViewDataDictionary(MetadataProvider, ViewContext.ViewData.ModelState) + { + Model = model, + }; return new PartialViewResult { ViewName = viewName, - ViewData = ViewContext.ViewData + ViewData = viewData }; } diff --git a/src/Mvc/Mvc.RazorPages/src/PageModel.cs b/src/Mvc/Mvc.RazorPages/src/PageModel.cs index 630084b897..b3dbc5b9da 100644 --- a/src/Mvc/Mvc.RazorPages/src/PageModel.cs +++ b/src/Mvc/Mvc.RazorPages/src/PageModel.cs @@ -139,6 +139,19 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } } + /// + /// Gets or sets the . + /// + public IModelMetadataProvider MetadataProvider + { + get + { + _metadataProvider ??= HttpContext?.RequestServices?.GetRequiredService(); + return _metadataProvider; + } + set => _metadataProvider = value ?? throw new ArgumentNullException(nameof(value)); + } + /// /// Gets the . /// @@ -157,19 +170,6 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } } - private IModelMetadataProvider MetadataProvider - { - get - { - if (_metadataProvider == null) - { - _metadataProvider = HttpContext?.RequestServices?.GetRequiredService(); - } - - return _metadataProvider; - } - } - private IModelBinderFactory ModelBinderFactory { get @@ -616,7 +616,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => Content(content, (MediaTypeHeaderValue)null); /// - /// Creates a object with by specifying a + /// Creates a object with by specifying a /// string and a content type. /// /// The content to write to the response. @@ -626,7 +626,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => Content(content, MediaTypeHeaderValue.Parse(contentType)); /// - /// Creates a object with by specifying a + /// Creates a object with by specifying a /// string, a , and . /// /// The content to write to the response. @@ -645,7 +645,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Creates a object with by specifying a + /// Creates a object with by specifying a /// string and a . /// /// The content to write to the response. @@ -692,14 +692,14 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// challenge. /// The created for the response. /// - /// Some authentication schemes, such as cookies, will convert to + /// Some authentication schemes, such as cookies, will convert to /// a redirect to show a login page. /// public virtual ForbidResult Forbid(AuthenticationProperties properties) => new ForbidResult(properties); /// - /// Creates a ( by default) with the + /// Creates a ( by default) with the /// specified authentication schemes and . /// /// used to perform the authentication @@ -780,7 +780,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => new VirtualFileResult(virtualPath, contentType) { FileDownloadName = fileDownloadName }; /// - /// Creates a object that redirects + /// Creates a object that redirects /// () to the specified local . /// /// The local URL to redirect to. @@ -813,7 +813,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// /// Creates a object with set to - /// false and set to true + /// false and set to true /// () using the specified . /// /// The local URL to redirect to. @@ -830,7 +830,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// /// Creates a object with set to - /// true and set to true + /// true and set to true /// () using the specified . /// /// The local URL to redirect to. @@ -924,7 +924,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// /// Creates a object with set to false - /// and set to true () + /// and set to true () /// using the specified . /// /// The URL to redirect to. @@ -941,7 +941,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// /// Creates a object with set to true - /// and set to true () + /// and set to true () /// using the specified . /// /// The URL to redirect to. @@ -965,7 +965,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => RedirectToAction(actionName, routeValues: null); /// - /// Redirects () to the specified action using the + /// Redirects () to the specified action using the /// and . /// /// The name of the action. @@ -975,7 +975,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => RedirectToAction(actionName, controllerName: null, routeValues: routeValues); /// - /// Redirects () to the specified action using the + /// Redirects () to the specified action using the /// and the . /// /// The name of the action. @@ -1034,15 +1034,15 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified action with - /// set to false and - /// set to true, using the specified , , + /// Redirects () to the specified action with + /// set to false and + /// set to true, using the specified , , /// , and . /// /// The name of the action. /// The name of the pageModel. /// The route data to use for generating the URL. - /// The fragment to add to the URL. + /// The fragment to add to the URL. /// The created for the response. public virtual RedirectToActionResult RedirectToActionPreserveMethod( string actionName = null, @@ -1063,7 +1063,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified action with + /// Redirects () to the specified action with /// set to true using the specified . /// /// The name of the action. @@ -1072,8 +1072,8 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => RedirectToActionPermanent(actionName, routeValues: null); /// - /// Redirects () to the specified action with - /// set to true using the specified + /// Redirects () to the specified action with + /// set to true using the specified /// and . /// /// The name of the action. @@ -1083,8 +1083,8 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => RedirectToActionPermanent(actionName, controllerName: null, routeValues: routeValues); /// - /// Redirects () to the specified action with - /// set to true using the specified + /// Redirects () to the specified action with + /// set to true using the specified /// and . /// /// The name of the action. @@ -1094,7 +1094,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => RedirectToActionPermanent(actionName, controllerName, routeValues: null); /// - /// Redirects () to the specified action with + /// Redirects () to the specified action with /// set to true using the specified , /// , and . /// @@ -1109,7 +1109,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => RedirectToActionPermanent(actionName, controllerName, routeValues: null, fragment: fragment); /// - /// Redirects () to the specified action with + /// Redirects () to the specified action with /// set to true using the specified , /// , and . /// @@ -1124,7 +1124,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => RedirectToActionPermanent(actionName, controllerName, routeValues, fragment: null); /// - /// Redirects () to the specified action with + /// Redirects () to the specified action with /// set to true using the specified , /// , , and . /// @@ -1151,16 +1151,16 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified action with + /// Redirects () to the specified action with /// set to true and - /// set to true, using the specified , , + /// set to true, using the specified , , /// , and . /// /// The name of the action. /// The name of the pageModel. /// The route data to use for generating the URL. /// The fragment to add to the URL. - /// The created for the response. + /// The created for the response. public virtual RedirectToActionResult RedirectToActionPermanentPreserveMethod( string actionName = null, string controllerName = null, @@ -1235,14 +1235,14 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified route with + /// Redirects () to the specified route with /// set to false and /// set to true, using the specified , , and . /// /// The name of the route. /// The route data to use for generating the URL. /// The fragment to add to the URL. - /// The created for the response. + /// The created for the response. public virtual RedirectToRouteResult RedirectToRoutePreserveMethod( string routeName = null, object routeValues = null, @@ -1260,7 +1260,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages } /// - /// Redirects () to the specified route with + /// Redirects () to the specified route with /// set to true using the specified . /// /// The name of the route. @@ -1269,7 +1269,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => RedirectToRoutePermanent(routeName, routeValues: null); /// - /// Redirects () to the specified route with + /// Redirects () to the specified route with /// set to true using the specified . /// /// The parameters for a route. @@ -1289,7 +1289,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => RedirectToRoutePermanent(routeName, routeValues, fragment: null); /// - /// Redirects () to the specified route with + /// Redirects () to the specified route with /// set to true using the specified /// and . /// @@ -1327,7 +1327,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// The name of the route. /// The route data to use for generating the URL. /// The fragment to add to the URL. - /// The created for the response. + /// The created for the response. public virtual RedirectToRouteResult RedirectToRoutePermanentPreserveMethod( string routeName = null, object routeValues = null, @@ -1494,7 +1494,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages => new RedirectToPageResult(pageName, pageHandler, routeValues, permanent: true, fragment: fragment); /// - /// Redirects () to the specified page with + /// Redirects () to the specified page with /// set to false and /// set to true, using the specified , , and . /// @@ -1502,7 +1502,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// The page handler to redirect to. /// The route data to use for generating the URL. /// The fragment to add to the URL. - /// The created for the response. + /// The created for the response. public virtual RedirectToPageResult RedirectToPagePreserveMethod( string pageName = null, string pageHandler = null, @@ -1527,7 +1527,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// The page handler to redirect to. /// The route data to use for generating the URL. /// The fragment to add to the URL. - /// The created for the response. + /// The created for the response. public virtual RedirectToPageResult RedirectToPagePermanentPreserveMethod( string pageName = null, string pageHandler = null, @@ -1631,12 +1631,18 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages /// The created object for the response. public virtual PartialViewResult Partial(string viewName, object model) { - ViewData.Model = model; + // PageModel.ViewData is an instance of ViewDataDictionary, but we need an instance + // of ViewDataDictionary. + + var viewData = new ViewDataDictionary(MetadataProvider, ViewData.ModelState) + { + Model = model, + }; return new PartialViewResult { ViewName = viewName, - ViewData = ViewData + ViewData = viewData }; } diff --git a/src/Mvc/Mvc.RazorPages/test/PageModelTest.cs b/src/Mvc/Mvc.RazorPages/test/PageModelTest.cs index bfb8d6991c..762f22e5d1 100644 --- a/src/Mvc/Mvc.RazorPages/test/PageModelTest.cs +++ b/src/Mvc/Mvc.RazorPages/test/PageModelTest.cs @@ -1898,13 +1898,15 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages public void PartialView_WithName() { // Arrange - var viewData = new ViewDataDictionary(new EmptyModelMetadataProvider(), new ModelStateDictionary()); + var modelMetadataProvider = new EmptyModelMetadataProvider(); + var viewData = new ViewDataDictionary(modelMetadataProvider, new ModelStateDictionary()); var pageModel = new TestPageModel { PageContext = new PageContext { ViewData = viewData - } + }, + MetadataProvider = modelMetadataProvider, }; // Act @@ -1913,20 +1915,22 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages // Assert Assert.NotNull(result); Assert.Equal("LoginStatus", result.ViewName); - Assert.Same(viewData, result.ViewData); + Assert.Null(result.Model); } [Fact] public void PartialView_WithNameAndModel() { // Arrange - var viewData = new ViewDataDictionary(new EmptyModelMetadataProvider(), new ModelStateDictionary()); + var modelMetadataProvider = new EmptyModelMetadataProvider(); + var viewData = new ViewDataDictionary(modelMetadataProvider, new ModelStateDictionary()); var pageModel = new TestPageModel { PageContext = new PageContext { ViewData = viewData - } + }, + MetadataProvider = modelMetadataProvider, }; var model = new { Username = "Admin" }; @@ -1937,7 +1941,6 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages Assert.NotNull(result); Assert.Equal("LoginStatus", result.ViewName); Assert.Equal(model, result.Model); - Assert.Same(viewData, result.ViewData); } [Fact] diff --git a/src/Mvc/Mvc.RazorPages/test/PageTest.cs b/src/Mvc/Mvc.RazorPages/test/PageTest.cs index f92db3a934..634986bdff 100644 --- a/src/Mvc/Mvc.RazorPages/test/PageTest.cs +++ b/src/Mvc/Mvc.RazorPages/test/PageTest.cs @@ -1700,14 +1700,17 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages public void PartialView_WithName() { // Arrange - var viewData = new ViewDataDictionary(new EmptyModelMetadataProvider(), new ModelStateDictionary()); + var modelMetadataProvider = new EmptyModelMetadataProvider(); + var viewData = new ViewDataDictionary(modelMetadataProvider, new ModelStateDictionary()); var pageModel = new TestPage { ViewContext = new ViewContext { ViewData = viewData - } + }, + MetadataProvider = modelMetadataProvider, }; + viewData.Model = pageModel; // Act var result = pageModel.Partial("LoginStatus"); @@ -1715,21 +1718,24 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages // Assert Assert.NotNull(result); Assert.Equal("LoginStatus", result.ViewName); - Assert.Same(viewData, result.ViewData); + Assert.Null(result.Model); } [Fact] public void PartialView_WithNameAndModel() { // Arrange - var viewData = new ViewDataDictionary(new EmptyModelMetadataProvider(), new ModelStateDictionary()); + var modelMetadataProvider = new EmptyModelMetadataProvider(); + var viewData = new ViewDataDictionary(modelMetadataProvider, new ModelStateDictionary()); var pageModel = new TestPage { ViewContext = new ViewContext { ViewData = viewData - } + }, + MetadataProvider = modelMetadataProvider, }; + viewData.Model = pageModel; var model = new { Username = "Admin" }; // Act @@ -1739,7 +1745,6 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages Assert.NotNull(result); Assert.Equal("LoginStatus", result.ViewName); Assert.Equal(model, result.Model); - Assert.Same(viewData, result.ViewData); } [Fact] diff --git a/src/Mvc/samples/MvcSandbox/Pages/PagesHome.cshtml b/src/Mvc/samples/MvcSandbox/Pages/PagesHome.cshtml index d44cbb6cd2..d4d5241a60 100644 --- a/src/Mvc/samples/MvcSandbox/Pages/PagesHome.cshtml +++ b/src/Mvc/samples/MvcSandbox/Pages/PagesHome.cshtml @@ -1,5 +1,5 @@ @page -@model TestModel +@model PagesHome @{ ViewData["Title"] = "Hello from pages"; diff --git a/src/Mvc/samples/MvcSandbox/Models/TestModel.cs b/src/Mvc/samples/MvcSandbox/Pages/PagesHome.cshtml.cs similarity index 92% rename from src/Mvc/samples/MvcSandbox/Models/TestModel.cs rename to src/Mvc/samples/MvcSandbox/Pages/PagesHome.cshtml.cs index 29e881e9a4..f33a1370fb 100644 --- a/src/Mvc/samples/MvcSandbox/Models/TestModel.cs +++ b/src/Mvc/samples/MvcSandbox/Pages/PagesHome.cshtml.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages; namespace MvcSandbox { - public class TestModel : PageModel + public class PagesHome : PageModel { public string Name { get; private set; } = "World"; diff --git a/src/Mvc/test/Mvc.FunctionalTests/RazorPagesTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RazorPagesTest.cs index 8ecd44c0bd..3fcb25f6fb 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RazorPagesTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RazorPagesTest.cs @@ -144,23 +144,43 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests } [Fact] - public async Task Page_Handler_ReturnPartialWithoutModel() + public async Task PageWithoutModel_ReturnPartial() { // Act - var document = await Client.GetHtmlDocumentAsync("RenderPartialWithoutModel"); + using var document = await Client.GetHtmlDocumentAsync("PageWithoutModelRenderPartial"); var element = document.RequiredQuerySelector("#content"); - Assert.Equal("Welcome, Guest", element.TextContent); + Assert.Equal("Hello from Razor Page", element.TextContent); } [Fact] - public async Task Page_Handler_ReturnPartialWithModel() + public async Task PageWithModel_Works() { // Act - var document = await Client.GetHtmlDocumentAsync("RenderPartialWithModel"); + using var document = await Client.GetHtmlDocumentAsync("RenderPartial"); var element = document.RequiredQuerySelector("#content"); - Assert.Equal("Welcome, Admin", element.TextContent); + Assert.Equal("Hello from RenderPartialModel", element.TextContent); + } + + [Fact] + public async Task PageWithModel_PartialUsingPageModelWorks() + { + // Act + using var document = await Client.GetHtmlDocumentAsync("RenderPartial/UsePageModelAsPartialModel"); + + var element = document.RequiredQuerySelector("#content"); + Assert.Equal("Hello from RenderPartialWithModel", element.TextContent); + } + + [Fact] + public async Task PageWithModel_PartialWithNoModel() + { + // Act + using var document = await Client.GetHtmlDocumentAsync("RenderPartial/NoPartialModel"); + + var element = document.RequiredQuerySelector("#content"); + Assert.Equal("Hello default", element.TextContent); } [Fact] diff --git a/src/Mvc/test/WebSites/RazorPagesWebSite/Models/RenderPartialModel.cs b/src/Mvc/test/WebSites/RazorPagesWebSite/Models/RenderPartialModel.cs new file mode 100644 index 0000000000..4d4dd804ee --- /dev/null +++ b/src/Mvc/test/WebSites/RazorPagesWebSite/Models/RenderPartialModel.cs @@ -0,0 +1,10 @@ +// 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. + +namespace RazorPagesWebSite.Models +{ + public class RenderPartialModel + { + public string Value { get; set; } + } +} diff --git a/src/Mvc/test/WebSites/RazorPagesWebSite/PageWithoutModelRenderPartial.cshtml b/src/Mvc/test/WebSites/RazorPagesWebSite/PageWithoutModelRenderPartial.cshtml new file mode 100644 index 0000000000..11f26d2171 --- /dev/null +++ b/src/Mvc/test/WebSites/RazorPagesWebSite/PageWithoutModelRenderPartial.cshtml @@ -0,0 +1,6 @@ +@page +@using RazorPagesWebSite.Models + +@functions { + public IActionResult OnGet() => Partial("_RenderPartial", new RenderPartialModel { Value = "Hello from Razor Page" }); +} diff --git a/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartial.cshtml b/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartial.cshtml new file mode 100644 index 0000000000..87e98ef7bc --- /dev/null +++ b/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartial.cshtml @@ -0,0 +1,7 @@ +@page "{handler?}" +@model RazorPagesWebSite.RenderPartialWithModel + +@{ + throw new Exception("This should not be called"); + +} \ No newline at end of file diff --git a/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartial.cshtml.cs b/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartial.cshtml.cs new file mode 100644 index 0000000000..03f6a00337 --- /dev/null +++ b/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartial.cshtml.cs @@ -0,0 +1,20 @@ +// 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.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; +using RazorPagesWebSite.Models; + +namespace RazorPagesWebSite +{ + public class RenderPartialWithModel : PageModel + { + public string Text { get; set; } = $"Hello from {nameof(RenderPartialWithModel)}"; + + public IActionResult OnGet() => Partial("_RenderPartial", new RenderPartialModel { Value = $"Hello from {nameof(RenderPartialModel)}" }); + + public IActionResult OnGetUsePageModelAsPartialModel() => Partial("_RenderPartialPageModel", this); + + public IActionResult OnGetNoPartialModel() => Partial("_RenderPartial"); + } +} diff --git a/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartialWithModel.cs b/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartialWithModel.cs deleted file mode 100644 index 82711aed2e..0000000000 --- a/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartialWithModel.cs +++ /dev/null @@ -1,15 +0,0 @@ -// 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.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; - -namespace RazorPagesWebSite -{ - public class RenderPartialWithModel : PageModel - { - public IActionResult OnGet() => Partial("_PartialWithModel", this); - - public string Username => "Admin"; - } -} diff --git a/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartialWithModel.cshtml b/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartialWithModel.cshtml deleted file mode 100644 index 27d507ed75..0000000000 --- a/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartialWithModel.cshtml +++ /dev/null @@ -1,4 +0,0 @@ -@page -@model RazorPagesWebSite.RenderPartialWithModel - -

The partial will be loaded here ...

\ No newline at end of file diff --git a/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartialWithoutModel.cshtml b/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartialWithoutModel.cshtml deleted file mode 100644 index b817a76e67..0000000000 --- a/src/Mvc/test/WebSites/RazorPagesWebSite/RenderPartialWithoutModel.cshtml +++ /dev/null @@ -1,5 +0,0 @@ -@page - -@functions { - public IActionResult OnGet() => Partial("_PartialWithoutModel"); -} diff --git a/src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/_PartialWithoutModel.cshtml b/src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/_PartialWithoutModel.cshtml deleted file mode 100644 index 40b6bbaf56..0000000000 --- a/src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/_PartialWithoutModel.cshtml +++ /dev/null @@ -1 +0,0 @@ -Welcome, Guest \ No newline at end of file diff --git a/src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/_RenderPartial.cshtml b/src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/_RenderPartial.cshtml new file mode 100644 index 0000000000..389bb80c65 --- /dev/null +++ b/src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/_RenderPartial.cshtml @@ -0,0 +1,4 @@ +@using RazorPagesWebSite.Models +@model RenderPartialModel + +@(Model?.Value ?? "Hello default") \ No newline at end of file diff --git a/src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/_PartialWithModel.cshtml b/src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/_RenderPartialPageModel.cshtml similarity index 50% rename from src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/_PartialWithModel.cshtml rename to src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/_RenderPartialPageModel.cshtml index 5c8194f423..46bceaf7ad 100644 --- a/src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/_PartialWithModel.cshtml +++ b/src/Mvc/test/WebSites/RazorPagesWebSite/Views/Shared/_RenderPartialPageModel.cshtml @@ -1,3 +1,3 @@ @model RazorPagesWebSite.RenderPartialWithModel -Welcome, @Model.Username \ No newline at end of file +@Model.Text \ No newline at end of file From e8917fc92f0f042203777c73ab6e2367bb5ab0ca Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Tue, 13 Aug 2019 20:51:39 +0100 Subject: [PATCH 24/24] [Blazor][Fixes #13056] Renderer use-after-disposal tweaks * Improves Renderer handling use after disposal. * Ensures RemoteRenderer skips resuming the render queue after ACK if it was since disposed --- .../Components/src/Rendering/Renderer.cs | 9 +++++ .../Components/test/RendererTest.cs | 39 ++++++++++++++++++- .../Server/src/Circuits/RemoteRenderer.cs | 10 ++++- src/Components/Shared/test/TestRenderer.cs | 3 ++ 4 files changed, 58 insertions(+), 3 deletions(-) diff --git a/src/Components/Components/src/Rendering/Renderer.cs b/src/Components/Components/src/Rendering/Renderer.cs index d1fdfa35ff..fba917bf05 100644 --- a/src/Components/Components/src/Rendering/Renderer.cs +++ b/src/Components/Components/src/Rendering/Renderer.cs @@ -28,6 +28,7 @@ namespace Microsoft.AspNetCore.Components.Rendering private bool _isBatchInProgress; private ulong _lastEventHandlerId; private List _pendingTasks; + private bool _disposed; /// /// Allows the caller to handle exceptions from the SynchronizationContext when one is available. @@ -403,6 +404,11 @@ namespace Microsoft.AspNetCore.Components.Rendering /// protected virtual void ProcessPendingRender() { + if (_disposed) + { + throw new ObjectDisposedException(nameof(Renderer), "Cannot process pending renders after the renderer has been disposed."); + } + ProcessRenderQueue(); } @@ -696,6 +702,8 @@ namespace Microsoft.AspNetCore.Components.Rendering /// if this method is being invoked by , otherwise . protected virtual void Dispose(bool disposing) { + _disposed = true; + // It's important that we handle all exceptions here before reporting any of them. // This way we can dispose all components before an error handler kicks in. List exceptions = null; @@ -717,6 +725,7 @@ namespace Microsoft.AspNetCore.Components.Rendering } } + _componentStateById.Clear(); // So we know they were all disposed _batchBuilder.Dispose(); if (exceptions?.Count > 1) diff --git a/src/Components/Components/test/RendererTest.cs b/src/Components/Components/test/RendererTest.cs index fbd91decf7..ccca6b8006 100644 --- a/src/Components/Components/test/RendererTest.cs +++ b/src/Components/Components/test/RendererTest.cs @@ -2552,7 +2552,7 @@ namespace Microsoft.AspNetCore.Components.Test .ComponentId; var origEventHandlerId = renderer.Batches.Single() .ReferenceFrames - .Where(f => f.FrameType == RenderTreeFrameType.Attribute && f.AttributeName == "onclick") + .Where(f => f.FrameType == RenderTreeFrameType.Attribute && f.AttributeName == "onmycustomevent") .Single(f => f.AttributeEventHandlerId != 0) .AttributeEventHandlerId; @@ -3490,6 +3490,41 @@ namespace Microsoft.AspNetCore.Components.Test Assert.True(component.Disposed); } + [Fact] + public void DisposingRenderer_RejectsAttemptsToStartMoreRenderBatches() + { + // Arrange + var renderer = new TestRenderer(); + renderer.Dispose(); + + // Act/Assert + var ex = Assert.Throws(() => renderer.ProcessPendingRender()); + Assert.Contains("Cannot process pending renders after the renderer has been disposed.", ex.Message); + } + + [Fact] + public void WhenRendererIsDisposed_ComponentRenderRequestsAreSkipped() + { + // The important point of this is that user code in components may continue to call + // StateHasChanged (e.g., after an async task completion), and we don't want that to + // show up as an error. In general, components should skip rendering after disposal. + // This test shows that we don't add any new entries to the render queue after disposal. + // There's a different test showing that if the render queue entry was already added + // before a component got individually disposed, that render queue entry gets skipped. + + // Arrange + var renderer = new TestRenderer(); + var component = new DisposableComponent(); + renderer.AssignRootComponentId(component); + + // Act + renderer.Dispose(); + component.TriggerRender(); + + // Assert: no exception, no batch produced + Assert.Empty(renderer.Batches); + } + [Fact] public void DisposingRenderer_DisposesNestedComponents() { @@ -3936,7 +3971,7 @@ namespace Microsoft.AspNetCore.Components.Test => _renderHandle.Render(builder => { builder.OpenElement(0, "my button"); - builder.AddAttribute(1, "my click handler", new Action(eventArgs => OnClick(eventArgs))); + builder.AddAttribute(1, "onmycustomevent", EventCallback.Factory.Create(this, eventArgs => OnClick(eventArgs))); builder.CloseElement(); }); } diff --git a/src/Components/Server/src/Circuits/RemoteRenderer.cs b/src/Components/Server/src/Circuits/RemoteRenderer.cs index 4c77968d42..2a1ded9244 100644 --- a/src/Components/Server/src/Circuits/RemoteRenderer.cs +++ b/src/Components/Server/src/Circuits/RemoteRenderer.cs @@ -284,7 +284,15 @@ namespace Microsoft.AspNetCore.Components.Web.Rendering // missing. // We return the task in here, but the caller doesn't await it. - return Dispatcher.InvokeAsync(() => ProcessPendingRender()); + return Dispatcher.InvokeAsync(() => + { + // Now we're on the sync context, check again whether we got disposed since this + // work item was queued. If so there's nothing to do. + if (!_disposing) + { + ProcessPendingRender(); + } + }); } } diff --git a/src/Components/Shared/test/TestRenderer.cs b/src/Components/Shared/test/TestRenderer.cs index 135a5cbda2..b44cdf479b 100644 --- a/src/Components/Shared/test/TestRenderer.cs +++ b/src/Components/Shared/test/TestRenderer.cs @@ -125,5 +125,8 @@ namespace Microsoft.AspNetCore.Components.Test.Helpers OnUpdateDisplayComplete?.Invoke(); return NextRenderResultTask; } + + public new void ProcessPendingRender() + => base.ProcessPendingRender(); } }