WebAssemblyRazorComponentsBuilderExtensions.AddAuthenticationStateSerialization Método

Definição

Serializa o AuthenticationState retornado pela AuthenticationStateProvider do lado do servidor usando PersistentComponentState para uso por componentes webAssembialization interativos por meio de um AuthenticationStateProvider do lado do cliente desserializador que pode ser adicionado chamando AddAuthenticationStateDeserialization do pacote Microsoft.AspNetCore.Components.WebAssembly.Authentication no projeto do cliente.

public static Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder AddAuthenticationStateSerialization (this Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder builder, Action<Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions>? configure = default);
static member AddAuthenticationStateSerialization : Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder * Action<Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions> -> Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder
<Extension()>
Public Function AddAuthenticationStateSerialization (builder As IRazorComponentsBuilder, Optional configure As Action(Of AuthenticationStateSerializationOptions) = Nothing) As IRazorComponentsBuilder

Parâmetros

configure
Action<AuthenticationStateSerializationOptions>

Um retorno de chamada para personalizar a serialização do AuthenticationState.

Retornos

Um IRazorComponentsBuilder que pode ser usado para personalizar ainda mais a configuração.

Aplica-se a