DataProtectionCommonExtensions.CreateProtector 方法

定义

重载

CreateProtector(IDataProtectionProvider, IEnumerable<String>)

创建给定 IDataProtector 的用途列表。

CreateProtector(IDataProtectionProvider, String, String[])

创建给定 IDataProtector 的用途列表。

CreateProtector(IDataProtectionProvider, IEnumerable<String>)

创建给定 IDataProtector 的用途列表。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::DataProtection::IDataProtector ^ CreateProtector(Microsoft::AspNetCore::DataProtection::IDataProtectionProvider ^ provider, System::Collections::Generic::IEnumerable<System::String ^> ^ purposes);
public static Microsoft.AspNetCore.DataProtection.IDataProtector CreateProtector (this Microsoft.AspNetCore.DataProtection.IDataProtectionProvider provider, System.Collections.Generic.IEnumerable<string> purposes);
static member CreateProtector : Microsoft.AspNetCore.DataProtection.IDataProtectionProvider * seq<string> -> Microsoft.AspNetCore.DataProtection.IDataProtector
<Extension()>
Public Function CreateProtector (provider As IDataProtectionProvider, purposes As IEnumerable(Of String)) As IDataProtector

参数

provider
IDataProtectionProvider

IDataProtectionProvider 从中生成目的链的 。

purposes
IEnumerable<String>

构成目的链的用途列表。 此列表必须至少包含一个元素,并且不能包含 null 元素。

返回

绑定到 IDataProtector 提供的用途链的 。

注解

这是一种便捷方法,它将对 CreateProtector(String)的多个调用链接在一起。 有关详细信息,请参阅该方法的文档。

适用于

CreateProtector(IDataProtectionProvider, String, String[])

创建给定 IDataProtector 的用途列表。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::DataProtection::IDataProtector ^ CreateProtector(Microsoft::AspNetCore::DataProtection::IDataProtectionProvider ^ provider, System::String ^ purpose, ... cli::array <System::String ^> ^ subPurposes);
public static Microsoft.AspNetCore.DataProtection.IDataProtector CreateProtector (this Microsoft.AspNetCore.DataProtection.IDataProtectionProvider provider, string purpose, params string[] subPurposes);
static member CreateProtector : Microsoft.AspNetCore.DataProtection.IDataProtectionProvider * string * string[] -> Microsoft.AspNetCore.DataProtection.IDataProtector
<Extension()>
Public Function CreateProtector (provider As IDataProtectionProvider, purpose As String, ParamArray subPurposes As String()) As IDataProtector

参数

provider
IDataProtectionProvider

IDataProtectionProvider 从中生成目的链的 。

purpose
String

用于创建 的主要 IDataProtector目的。

subPurposes
String[]

有助于目的链的辅助用途的可选列表。 如果提供此列表,则不能包含 null 元素。

返回

绑定到 IDataProtector 提供的用途链的 。

注解

这是一种便捷方法,它将对 CreateProtector(String)的多个调用链接在一起。 有关详细信息,请参阅该方法的文档。

适用于