fix(DIExtensions): arrangierte Mail- und Dispatcher-Konfigurationen
This commit is contained in:
parent
c1d8f817bb
commit
ac861f5fa0
@ -2,6 +2,6 @@
|
||||
{
|
||||
public class MailConfig
|
||||
{
|
||||
public required Dictionary<string, string> Placeholders { get; init; } = new();
|
||||
public required Dictionary<string, string> Placeholders { get; init; }
|
||||
}
|
||||
}
|
||||
@ -12,7 +12,7 @@ namespace EnvelopeGenerator.Application
|
||||
{
|
||||
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
|
||||
services.AddScoped<IConfigRepository, ConfigRepository>();
|
||||
@ -57,7 +57,7 @@ namespace EnvelopeGenerator.Application
|
||||
}
|
||||
|
||||
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration config) => services.AddEnvelopeGenerator(
|
||||
dispatcherConfigSection: config.GetSection(typeof(DispatcherConfig).ToString()),
|
||||
mailConfigSection: config.GetSection(typeof(MailConfig).ToString()));
|
||||
dispatcherConfigSection: config.GetSection("DispatcherConfig"),
|
||||
mailConfigSection: config.GetSection("MailConfig"));
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user