DataProtectionServiceCollectionExtensions.AddDataProtection 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.
Overloads
AddDataProtection(IServiceCollection) |
Adds data protection services to the specified IServiceCollection. |
AddDataProtection(IServiceCollection, Action<DataProtectionOptions>) |
Adds data protection services to the specified IServiceCollection. |
AddDataProtection(IServiceCollection)
Adds data protection services to the specified IServiceCollection.
public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder AddDataProtection (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddDataProtection : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder
<Extension()>
Public Function AddDataProtection (services As IServiceCollection) As IDataProtectionBuilder
Parameters
- services
- IServiceCollection
The IServiceCollection to add services to.
Returns
Applies to
AddDataProtection(IServiceCollection, Action<DataProtectionOptions>)
Adds data protection services to the specified IServiceCollection.
public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder AddDataProtection (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.DataProtection.DataProtectionOptions> setupAction);
static member AddDataProtection : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.DataProtection.DataProtectionOptions> -> Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder
<Extension()>
Public Function AddDataProtection (services As IServiceCollection, setupAction As Action(Of DataProtectionOptions)) As IDataProtectionBuilder
Parameters
- services
- IServiceCollection
The IServiceCollection to add services to.
- setupAction
- Action<DataProtectionOptions>
An Action<T> to configure the provided DataProtectionOptions.
Returns
A reference to this instance after the operation has completed.