fix(DIExtensions): Umbenennung der Methode AddAsymCryptService in AddAsymCryptHandler

This commit is contained in:
Developer 02 2025-01-07 10:38:10 +01:00
parent c27e21a702
commit 14485af448

View File

@ -13,7 +13,7 @@ namespace DigitalData.Core.Security
private static IServiceCollection AddParamsConfigureOptions<TParams>(this IServiceCollection services) where TParams : RSAFactoryParams private static IServiceCollection AddParamsConfigureOptions<TParams>(this IServiceCollection services) where TParams : RSAFactoryParams
=> services.AddSingleton<IConfigureOptions<TParams>, ParamsConfigureOptions<TParams>>(); => services.AddSingleton<IConfigureOptions<TParams>, ParamsConfigureOptions<TParams>>();
private static IServiceCollection AddAsymCryptService(this IServiceCollection services) => services private static IServiceCollection AddAsymCryptHandler(this IServiceCollection services) => services
.AddParamsConfigureOptions<AsymCryptParams>() .AddParamsConfigureOptions<AsymCryptParams>()
.AddAutoMapper(typeof(MappingProfile).Assembly) .AddAutoMapper(typeof(MappingProfile).Assembly)
.AddSingleton<IAsymCryptHandler, AsymCryptHandler>(); .AddSingleton<IAsymCryptHandler, AsymCryptHandler>();
@ -24,18 +24,18 @@ namespace DigitalData.Core.Security
/// <param name="services"></param> /// <param name="services"></param>
/// <param name="section"></param> /// <param name="section"></param>
/// <returns>The updated <see cref="IServiceCollection"/> with the RSA Factory registered.</returns> /// <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) .Configure<AsymCryptParams>(section)
.AddAsymCryptService(); .AddAsymCryptHandler();
/// <summary> /// <summary>
/// Registers an asym crypt service with the specified parameters from the given instance. /// Registers an asym crypt service with the specified parameters from the given instance.
/// </summary> /// </summary>
/// <param name="services"></param> /// <param name="services"></param>
/// <returns>The updated <see cref="IServiceCollection"/> with the RSA Factory registered.</returns> /// <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())) .AddSingleton(Options.Create(asymCryptParams ?? new()))
.AddAsymCryptService(); .AddAsymCryptHandler();
/// <summary> /// <summary>
/// Registers a custom RSA Factory with specified parameters from the given configuration section. /// Registers a custom RSA Factory with specified parameters from the given configuration section.