WebAssemblyAuthenticationServiceCollectionExtensions.AddAuthenticationStateDeserialization Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Dodaje AuthenticationStateProvider, w którym AuthenticationState jest deserializowany z serwera przy użyciu AuthenticationStateData i PersistentComponentState. W projekcie serwera powinien istnieć odpowiednie wywołanie polecenia AddAuthenticationStateSerialization z pakietu Microsoft.AspNetCore.Components.WebAssembly.Server.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthenticationStateDeserialization (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthenticationStateDeserializationOptions>? configure = default);
static member AddAuthenticationStateDeserialization : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Components.WebAssembly.Authentication.AuthenticationStateDeserializationOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAuthenticationStateDeserialization (services As IServiceCollection, Optional configure As Action(Of AuthenticationStateDeserializationOptions) = Nothing) As IServiceCollection
Parametry
- services
- IServiceCollection
IServiceCollection, do których mają zostać dodane usługi.
- configure
- Action<AuthenticationStateDeserializationOptions>
Akcja, która skonfiguruje AuthenticationStateDeserializationOptions.