fix(DIExtensions): aktualisiert, um den richtigen Abschnittsnamen einzugeben.
- ConfigureByTypeName entfernt
This commit is contained in:
parent
614f3768d9
commit
51d77367ca
@ -11,8 +11,8 @@ using Microsoft.Extensions.DependencyInjection.Extensions;
|
|||||||
using DigitalData.Core.Client;
|
using DigitalData.Core.Client;
|
||||||
using QRCoder;
|
using QRCoder;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Extensions
|
namespace EnvelopeGenerator.Application.Extensions;
|
||||||
{
|
|
||||||
public static class DIExtensions
|
public static class DIExtensions
|
||||||
{
|
{
|
||||||
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration config)
|
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration config)
|
||||||
@ -53,10 +53,10 @@ namespace EnvelopeGenerator.Application.Extensions
|
|||||||
services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
|
services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
|
||||||
services.AddAutoMapper(typeof(UserMappingProfile).Assembly);
|
services.AddAutoMapper(typeof(UserMappingProfile).Assembly);
|
||||||
|
|
||||||
services.ConfigureByTypeName<DispatcherParams>(config);
|
services.Configure<DispatcherParams>(config.GetSection(nameof(DispatcherParams)));
|
||||||
services.ConfigureByTypeName<MailParams>(config);
|
services.Configure<MailParams>(config.GetSection(nameof(MailParams)));
|
||||||
services.ConfigureByTypeName<AuthenticatorParams>(config);
|
services.Configure<AuthenticatorParams>(config.GetSection(nameof(AuthenticatorParams)));
|
||||||
services.ConfigureByTypeName<TotpSmsParams>(config);
|
services.Configure<TotpSmsParams>(config.GetSection(nameof(TotpSmsParams)));
|
||||||
|
|
||||||
services.AddHttpClientService<GtxMessagingParams>(config.GetSection(nameof(GtxMessagingParams)));
|
services.AddHttpClientService<GtxMessagingParams>(config.GetSection(nameof(GtxMessagingParams)));
|
||||||
services.TryAddSingleton<ISmsSender, GTXSmsSender>();
|
services.TryAddSingleton<ISmsSender, GTXSmsSender>();
|
||||||
@ -66,9 +66,4 @@ namespace EnvelopeGenerator.Application.Extensions
|
|||||||
|
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: move to DigitalData.Core
|
|
||||||
private static IServiceCollection ConfigureByTypeName<TOptions>(this IServiceCollection services, IConfiguration configuration) where TOptions : class
|
|
||||||
=> services.Configure<TOptions>(configuration.GetSection(nameof(TOptions)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user