DataProtectionCommonExtensions.GetDataProtectionProvider Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves an IDataProtectionProvider from an 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
Parameters
- services
- IServiceProvider
The service provider from which to retrieve the IDataProtectionProvider.
Returns
An IDataProtectionProvider. This method is guaranteed never to return null.
Exceptions
If no IDataProtectionProvider service exists in services
.