Поделиться через


WebAssemblyAuthenticationServiceCollectionExtensions.AddAuthenticationStateDeserialization Метод

Определение

Добавляет AuthenticationStateProvider, где AuthenticationState десериализирован с сервера с помощью AuthenticationStateData и PersistentComponentState. В проекте сервера должен быть соответствующий вызов AddAuthenticationStateSerialization из пакета 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

Параметры

services
IServiceCollection

IServiceCollection для добавления служб.

configure
Action<AuthenticationStateDeserializationOptions>

Действие, которое будет настраивать AuthenticationStateDeserializationOptions.

Возвращаемое значение

Применяется к