共用方式為


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

適用於