fix(DIExtensions): aktualisiert, um den richtigen Abschnittsnamen einzugeben.
- ConfigureByTypeName entfernt
This commit is contained in:
parent
614f3768d9
commit
51d77367ca
@ -11,10 +11,10 @@ using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using DigitalData.Core.Client;
|
||||
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)
|
||||
{
|
||||
//Inject CRUD Service and repositoriesad
|
||||
@ -53,10 +53,10 @@ namespace EnvelopeGenerator.Application.Extensions
|
||||
services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
|
||||
services.AddAutoMapper(typeof(UserMappingProfile).Assembly);
|
||||
|
||||
services.ConfigureByTypeName<DispatcherParams>(config);
|
||||
services.ConfigureByTypeName<MailParams>(config);
|
||||
services.ConfigureByTypeName<AuthenticatorParams>(config);
|
||||
services.ConfigureByTypeName<TotpSmsParams>(config);
|
||||
services.Configure<DispatcherParams>(config.GetSection(nameof(DispatcherParams)));
|
||||
services.Configure<MailParams>(config.GetSection(nameof(MailParams)));
|
||||
services.Configure<AuthenticatorParams>(config.GetSection(nameof(AuthenticatorParams)));
|
||||
services.Configure<TotpSmsParams>(config.GetSection(nameof(TotpSmsParams)));
|
||||
|
||||
services.AddHttpClientService<GtxMessagingParams>(config.GetSection(nameof(GtxMessagingParams)));
|
||||
services.TryAddSingleton<ISmsSender, GTXSmsSender>();
|
||||
@ -66,9 +66,4 @@ namespace EnvelopeGenerator.Application.Extensions
|
||||
|
||||
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