feat(EnvelopeReceiverCache): zum Abrufen und Setzen von Caches über Envelope Receiver unter Verwendung von Standard-Schlüsselwörtern als Schnittstellenimplementierung erstellt.

- Erstellte Optionen.
 - Zu DI hinzugefügt.
This commit is contained in:
Developer 02
2024-11-30 03:46:40 +01:00
parent fa44b82493
commit 40a21a0b89
7 changed files with 101 additions and 36 deletions

View File

@@ -15,7 +15,7 @@ namespace EnvelopeGenerator.Application.Extensions
{
public static class DIExtensions
{
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfigurationSection dispatcherConfigSection, IConfigurationSection mailConfigSection, IConfigurationSection smsConfigSection, IConfigurationSection codeGeneratorConfigSection)
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfigurationSection dispatcherConfigSection, IConfigurationSection mailConfigSection, IConfigurationSection smsConfigSection, IConfigurationSection codeGeneratorConfigSection, IConfigurationSection envelopeReceiverCacheParamsSection)
{
//Inject CRUD Service and repositoriesad
services.TryAddScoped<IConfigRepository, ConfigRepository>();
@@ -56,10 +56,12 @@ namespace EnvelopeGenerator.Application.Extensions
services.Configure<DispatcherConfig>(dispatcherConfigSection);
services.Configure<MailConfig>(mailConfigSection);
services.Configure<CodeGeneratorConfig>(codeGeneratorConfigSection);
services.Configure<EnvelopeReceiverCacheParams>(envelopeReceiverCacheParamsSection);
services.AddHttpClientService<SmsParams>(smsConfigSection);
services.TryAddSingleton<IMessagingService, GtxMessagingService>();
services.TryAddSingleton<ICodeGenerator, CodeGenerator>();
services.TryAddSingleton<IEnvelopeReceiverCache, EnvelopeReceiverCache>();
return services;
}
@@ -68,6 +70,7 @@ namespace EnvelopeGenerator.Application.Extensions
dispatcherConfigSection: config.GetSection("DispatcherConfig"),
mailConfigSection: config.GetSection("MailConfig"),
smsConfigSection: config.GetSection("SmsConfig"),
codeGeneratorConfigSection: config.GetSection("CodeGeneratorConfig"));
codeGeneratorConfigSection: config.GetSection("CodeGeneratorConfig"),
envelopeReceiverCacheParamsSection: config.GetSection("EnvelopeReceiverCacheParams"));
}
}