WebAssemblyAuthenticationServiceCollectionExtensions.AddAuthenticationStateDeserialization 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用 AuthenticationStateData 和 PersistentComponentState从服务器反序列化 AuthenticationState 的 AuthenticationStateProvider。 应从服务器项目中的 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。
- configure
- Action<AuthenticationStateDeserializationOptions>