DataProtectionCommonExtensions.GetDataProtector メソッド

定義

オーバーロード

GetDataProtector(IServiceProvider, IEnumerable<String>)

特定の IDataProtector 目的の一覧から IServiceProvider を取得します。

GetDataProtector(IServiceProvider, String, String[])

特定の IDataProtector 目的の一覧から IServiceProvider を取得します。

GetDataProtector(IServiceProvider, IEnumerable<String>)

特定の IDataProtector 目的の一覧から IServiceProvider を取得します。

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

パラメーター

services
IServiceProvider

IServiceProvider目的チェーンのIDataProtectionProvider生成元となる を含む 。

purposes
IEnumerable<String>

目的チェーンに寄与する目的の一覧。 このリストには少なくとも 1 つの要素が含まれている必要があり、null 要素が含まれていない可能性があります。

戻り値

IDataProtector指定された目的チェーンに関連付けられている 。

注釈

これは、 をCreateProtector(IDataProtectionProvider, IEnumerable<String>)呼び出GetDataProtectionProvider(IServiceProvider)す便利なメソッドです。 詳細については、これらのメソッドのドキュメントを参照してください。

適用対象

GetDataProtector(IServiceProvider, String, String[])

特定の IDataProtector 目的の一覧から IServiceProvider を取得します。

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

パラメーター

services
IServiceProvider

IServiceProvider目的チェーンのIDataProtectionProvider生成元となる を含む 。

purpose
String

を作成 IDataProtectorするために使用される主な目的。

subPurposes
String[]

目的チェーンに寄与するセカンダリ目的の省略可能な一覧。 このリストが指定されている場合、null 要素を含めることはできません。

戻り値

IDataProtector指定された目的チェーンに関連付けられている 。

注釈

これは、 をCreateProtector(IDataProtectionProvider, String, String[])呼び出GetDataProtectionProvider(IServiceProvider)す便利なメソッドです。 詳細については、これらのメソッドのドキュメントを参照してください。

適用対象