Share via


DataProtectionCommonExtensions.CreateProtector Method

Definition

Overloads

CreateProtector(IDataProtectionProvider, IEnumerable<String>)

Creates an IDataProtector given a list of purposes.

CreateProtector(IDataProtectionProvider, String, String[])

Creates an IDataProtector given a list of purposes.

CreateProtector(IDataProtectionProvider, IEnumerable<String>)

Source:
DataProtectionCommonExtensions.cs
Source:
DataProtectionCommonExtensions.cs
Source:
DataProtectionCommonExtensions.cs
Source:
DataProtectionCommonExtensions.cs
Source:
DataProtectionCommonExtensions.cs
Source:
DataProtectionCommonExtensions.cs
Source:
DataProtectionCommonExtensions.cs
Source:
DataProtectionCommonExtensions.cs

Creates an IDataProtector given a list of purposes.

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

Parameters

provider
IDataProtectionProvider

The IDataProtectionProvider from which to generate the purpose chain.

purposes
IEnumerable<String>

The list of purposes which contribute to the purpose chain. This list must contain at least one element, and it may not contain null elements.

Returns

An IDataProtector tied to the provided purpose chain.

Remarks

This is a convenience method which chains together several calls to CreateProtector(String). See that method's documentation for more information.

Applies to

CreateProtector(IDataProtectionProvider, String, String[])

Source:
DataProtectionCommonExtensions.cs
Source:
DataProtectionCommonExtensions.cs
Source:
DataProtectionCommonExtensions.cs
Source:
DataProtectionCommonExtensions.cs
Source:
DataProtectionCommonExtensions.cs
Source:
DataProtectionCommonExtensions.cs
Source:
DataProtectionCommonExtensions.cs
Source:
DataProtectionCommonExtensions.cs

Creates an IDataProtector given a list of purposes.

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

Parameters

provider
IDataProtectionProvider

The IDataProtectionProvider from which to generate the purpose chain.

purpose
String

The primary purpose used to create the IDataProtector.

subPurposes
String[]

An optional list of secondary purposes which contribute to the purpose chain. If this list is provided it cannot contain null elements.

Returns

An IDataProtector tied to the provided purpose chain.

Remarks

This is a convenience method which chains together several calls to CreateProtector(String). See that method's documentation for more information.

Applies to