DataProtectionCommonExtensions.GetDataProtectionProvider 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
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 。