Partager via


WebAssemblyAuthenticationServiceCollectionExtensions.AddAuthenticationStateDeserialization Méthode

Définition

Ajoute un AuthenticationStateProvider où le AuthenticationState est désérialisé à partir du serveur à l’aide de AuthenticationStateData et de PersistentComponentState. Il doit y avoir un appel correspondant à AddAuthenticationStateSerialization à partir du package Microsoft.AspNetCore.Components.WebAssembly.Server dans le projet de serveur.

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

Paramètres

services
IServiceCollection

La IServiceCollection à laquelle ajouter les services.

Retours

S’applique à