DataProtectionBuilderExtensions.SetApplicationName 方法

定义

设置数据保护系统中此应用程序的唯一名称。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ SetApplicationName(Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ builder, System::String ^ applicationName);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder SetApplicationName (this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string applicationName);
static member SetApplicationName : Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder * string -> Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder
<Extension()>
Public Function SetApplicationName (builder As IDataProtectionBuilder, applicationName As String) As IDataProtectionBuilder

参数

applicationName
String

应用程序名称。

返回

此操作完成后对 IDataProtectionBuilder 的引用。

注解

此 API 对应于将 ApplicationDiscriminator 属性设置为 的值 applicationName

适用于