WebAssemblyAuthenticationServiceCollectionExtensions.AddAuthenticationStateDeserialization 方法

定义

使用 AuthenticationStateDataPersistentComponentState从服务器反序列化 AuthenticationStateAuthenticationStateProvider。 应从服务器项目中的 Microsoft.AspNetCore.Components.WebAssembly.Server 包调用 AddAuthenticationStateSerialization。

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

返回

适用于