DataProtectionServiceCollectionExtensions Class

Extension methods for setting up data protection services in an Microsoft.Extensions.DependencyInjection.IServiceCollection.

Namespace
Microsoft.Extensions.DependencyInjection
Assemblies
  • Microsoft.AspNetCore.DataProtection

Syntax

public class DataProtectionServiceCollectionExtensions
class Microsoft.Extensions.DependencyInjection.DataProtectionServiceCollectionExtensions

Methods

AddDataProtection(Microsoft.Extensions.DependencyInjection.IServiceCollection)

Adds data protection services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection.

Arguments:services (Microsoft.Extensions.DependencyInjection.IServiceCollection) – The Microsoft.Extensions.DependencyInjection.IServiceCollection to add services to.
Return type:Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder
public static IDataProtectionBuilder AddDataProtection(this IServiceCollection services)
AddDataProtection(Microsoft.Extensions.DependencyInjection.IServiceCollection, System.Action<Microsoft.AspNetCore.DataProtection.DataProtectionOptions>)

Adds data protection services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection.

Arguments:
Return type:

Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder

Returns:

A reference to this instance after the operation has completed.

public static IDataProtectionBuilder AddDataProtection(this IServiceCollection services, Action<DataProtectionOptions> setupAction)