fix(DIExtensions): Umbenennung der Methode AddAsymCryptService in AddAsymCryptHandler
This commit is contained in:
parent
c27e21a702
commit
14485af448
@ -13,7 +13,7 @@ namespace DigitalData.Core.Security
|
||||
private static IServiceCollection AddParamsConfigureOptions<TParams>(this IServiceCollection services) where TParams : RSAFactoryParams
|
||||
=> services.AddSingleton<IConfigureOptions<TParams>, ParamsConfigureOptions<TParams>>();
|
||||
|
||||
private static IServiceCollection AddAsymCryptService(this IServiceCollection services) => services
|
||||
private static IServiceCollection AddAsymCryptHandler(this IServiceCollection services) => services
|
||||
.AddParamsConfigureOptions<AsymCryptParams>()
|
||||
.AddAutoMapper(typeof(MappingProfile).Assembly)
|
||||
.AddSingleton<IAsymCryptHandler, AsymCryptHandler>();
|
||||
@ -24,18 +24,18 @@ namespace DigitalData.Core.Security
|
||||
/// <param name="services"></param>
|
||||
/// <param name="section"></param>
|
||||
/// <returns>The updated <see cref="IServiceCollection"/> with the RSA Factory registered.</returns>
|
||||
public static IServiceCollection AddAsymCryptService(this IServiceCollection services, IConfigurationSection section) => services
|
||||
public static IServiceCollection AddAsymCryptHandler(this IServiceCollection services, IConfigurationSection section) => services
|
||||
.Configure<AsymCryptParams>(section)
|
||||
.AddAsymCryptService();
|
||||
.AddAsymCryptHandler();
|
||||
|
||||
/// <summary>
|
||||
/// Registers an asym crypt service with the specified parameters from the given instance.
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <returns>The updated <see cref="IServiceCollection"/> with the RSA Factory registered.</returns>
|
||||
public static IServiceCollection AddAsymCryptService(this IServiceCollection services, AsymCryptParams? asymCryptParams = null) => services
|
||||
public static IServiceCollection AddAsymCryptHandler(this IServiceCollection services, AsymCryptParams? asymCryptParams = null) => services
|
||||
.AddSingleton(Options.Create(asymCryptParams ?? new()))
|
||||
.AddAsymCryptService();
|
||||
.AddAsymCryptHandler();
|
||||
|
||||
/// <summary>
|
||||
/// Registers a custom RSA Factory with specified parameters from the given configuration section.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user