|
#pragma checksum "D:\a\_work\1\s\src\Components\Authorization\src\CascadingAuthenticationState.razor" "{8829d00f-11b8-4213-878b-770e8597ac16}" "497a7533411fefdadb19a5f233635ae9f3e1073098c7a9bf65a37c4d8cab4c01"
// <auto-generated/>
#pragma warning disable 1591
namespace Microsoft.AspNetCore.Components.Authorization
{
#line default
using global::System;
using global::System.Collections.Generic;
using global::System.Linq;
using global::System.Threading.Tasks;
using global::Microsoft.AspNetCore.Components;
#line default
#line hidden
#nullable restore
public partial class CascadingAuthenticationState : global::Microsoft.AspNetCore.Components.ComponentBase,
#nullable restore
#line (1,13)-(1,24) "D:\a\_work\1\s\src\Components\Authorization\src\CascadingAuthenticationState.razor"
IDisposable
#line default
#line hidden
#nullable disable
#nullable disable
{
#pragma warning disable 1998
protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.OpenComponent<global::Microsoft.AspNetCore.Components.CascadingValue<
#nullable restore
#line (4,25)-(4,73) "D:\a\_work\1\s\src\Components\Authorization\src\CascadingAuthenticationState.razor"
System.Threading.Tasks.Task<AuthenticationState>
#line default
#line hidden
#nullable disable
>>(0);
__builder.AddComponentParameter(1, nameof(global::Microsoft.AspNetCore.Components.CascadingValue<System.Threading.Tasks.Task<AuthenticationState>>.
#nullable restore
#line (4,75)-(4,80) "D:\a\_work\1\s\src\Components\Authorization\src\CascadingAuthenticationState.razor"
Value
#line default
#line hidden
#nullable disable
), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Threading.Tasks.Task<AuthenticationState>>(
#nullable restore
#line (4,83)-(4,114) "D:\a\_work\1\s\src\Components\Authorization\src\CascadingAuthenticationState.razor"
_currentAuthenticationStateTask
#line default
#line hidden
#nullable disable
));
__builder.AddComponentParameter(2, nameof(global::Microsoft.AspNetCore.Components.CascadingValue<System.Threading.Tasks.Task<AuthenticationState>>.
#nullable restore
#line (4,116)-(4,128) "D:\a\_work\1\s\src\Components\Authorization\src\CascadingAuthenticationState.razor"
ChildContent
#line default
#line hidden
#nullable disable
), (global::Microsoft.AspNetCore.Components.RenderFragment)(
#nullable restore
#line (4,131)-(4,143) "D:\a\_work\1\s\src\Components\Authorization\src\CascadingAuthenticationState.razor"
ChildContent
#line default
#line hidden
#nullable disable
));
__builder.CloseComponent();
}
#pragma warning restore 1998
#nullable restore
#line (6,8)-(36,1) "D:\a\_work\1\s\src\Components\Authorization\src\CascadingAuthenticationState.razor"
private Task<AuthenticationState>? _currentAuthenticationStateTask;
/// <summary>
/// The content to which the authentication state should be provided.
/// </summary>
[Parameter]
public RenderFragment? ChildContent { get; set; }
protected override void OnInitialized()
{
AuthenticationStateProvider.AuthenticationStateChanged += OnAuthenticationStateChanged;
_currentAuthenticationStateTask = AuthenticationStateProvider
.GetAuthenticationStateAsync();
}
private void OnAuthenticationStateChanged(Task<AuthenticationState> newAuthStateTask)
{
_ = InvokeAsync(() =>
{
_currentAuthenticationStateTask = newAuthStateTask;
StateHasChanged();
});
}
void IDisposable.Dispose()
{
AuthenticationStateProvider.AuthenticationStateChanged -= OnAuthenticationStateChanged;
}
#line default
#line hidden
#nullable disable
[global::Microsoft.AspNetCore.Components.InjectAttribute] private
#nullable restore
#line (2,9)-(2,36) "D:\a\_work\1\s\src\Components\Authorization\src\CascadingAuthenticationState.razor"
AuthenticationStateProvider
#line default
#line hidden
#nullable disable
#nullable restore
#line (2,37)-(2,64) "D:\a\_work\1\s\src\Components\Authorization\src\CascadingAuthenticationState.razor"
AuthenticationStateProvider
#line default
#line hidden
#nullable disable
{ get; set; }
= default!;
}
}
#pragma warning restore 1591
|