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