WebAssemblyRazorComponentsBuilderExtensions.AddAuthenticationStateSerialization Metodo

Definizione

Serializza il AuthenticationState restituito dal AuthenticationStateProvider lato server utilizzando PersistentComponentState per l'uso da parte di componenti WebAssembly interattivi tramite un AuthenticationStateProvider lato client deserializzato che può essere aggiunto chiamando AddAuthenticationStateDeserialization dal pacchetto Microsoft.AspNetCore.Components.WebAssembly.Authentication nel progetto client.

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

Parametri

configure
Action<AuthenticationStateSerializationOptions>

Callback per personalizzare la serializzazione del AuthenticationState.

Restituisce

Un IRazorComponentsBuilder che può essere usato per personalizzare ulteriormente la configurazione.

Si applica a