次の方法で共有


DataProtectionCommonExtensions.GetDataProtectionProvider メソッド

定義

から を IDataProtectionProvider 取得します IServiceProvider

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::DataProtection::IDataProtectionProvider ^ GetDataProtectionProvider(IServiceProvider ^ services);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider GetDataProtectionProvider(this IServiceProvider services);
static member GetDataProtectionProvider : IServiceProvider -> Microsoft.AspNetCore.DataProtection.IDataProtectionProvider
<Extension()>
Public Function GetDataProtectionProvider (services As IServiceProvider) As IDataProtectionProvider

パラメーター

services
IServiceProvider

を取得 IDataProtectionProviderするサービス プロバイダー。

戻り値

IDataProtectionProvider。 このメソッドは null を返さないことが保証されています。

例外

servicesサービスが存在しないIDataProtectionProvider場合。

適用対象