Поделиться через


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.

Исключения

Если служба не IDataProtectionProvider существует в services.

Применяется к