fix(DIExtensions): arrangierte Mail- und Dispatcher-Konfigurationen

This commit is contained in:
Developer 02 2024-10-09 02:05:21 +02:00
parent c1d8f817bb
commit ac861f5fa0
2 changed files with 4 additions and 4 deletions

View File

@ -2,6 +2,6 @@
{ {
public class MailConfig public class MailConfig
{ {
public required Dictionary<string, string> Placeholders { get; init; } = new(); public required Dictionary<string, string> Placeholders { get; init; }
} }
} }

View File

@ -12,7 +12,7 @@ namespace EnvelopeGenerator.Application
{ {
public static class DIExtensions public static class DIExtensions
{ {
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfigurationSection dispatcherConfigSection, IConfigurationSection mailConfigSection) public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration dispatcherConfigSection, IConfiguration mailConfigSection)
{ {
//Inject CRUD Service and repositoriesad //Inject CRUD Service and repositoriesad
services.AddScoped<IConfigRepository, ConfigRepository>(); services.AddScoped<IConfigRepository, ConfigRepository>();
@ -57,7 +57,7 @@ namespace EnvelopeGenerator.Application
} }
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration config) => services.AddEnvelopeGenerator( public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration config) => services.AddEnvelopeGenerator(
dispatcherConfigSection: config.GetSection(typeof(DispatcherConfig).ToString()), dispatcherConfigSection: config.GetSection("DispatcherConfig"),
mailConfigSection: config.GetSection(typeof(MailConfig).ToString())); mailConfigSection: config.GetSection("MailConfig"));
} }
} }