Refactor DI for Envelope services and add new executor

Updated DIExtensions to register IEnvelopeExecutor as a singleton and added IEnvelopeReceiverExecutor as a new singleton service. Introduced IEnvelopeReceiverExecutor interface and implemented it in the new EnvelopeReceiverExecutor class for future envelope processing functionality.
This commit is contained in:
Developer 02 2025-05-06 09:59:18 +02:00
parent 40dc0ecda3
commit 749366fff5
3 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,8 @@
namespace EnvelopeGenerator.Application.Contracts.SQLExecutor;
/// <summary>
///
/// </summary>
public interface IEnvelopeReceiverExecutor
{
}

View File

@ -82,7 +82,8 @@ public static class DIExtensions
SetDapperTypeMap<DocumentReceiverElement>(); SetDapperTypeMap<DocumentReceiverElement>();
SetDapperTypeMap<DocumentStatus>(); SetDapperTypeMap<DocumentStatus>();
services.AddScoped<IEnvelopeExecutor, EnvelopeExecutor>(); services.AddSingleton<IEnvelopeExecutor, EnvelopeExecutor>();
services.AddSingleton<IEnvelopeReceiverExecutor, EnvelopeReceiverExecutor>();
if (sqlExecutorConfiguration is not null || sqlExecutorConfigureOptions is not null) if (sqlExecutorConfiguration is not null || sqlExecutorConfigureOptions is not null)
services.AddSQLExecutor(sqlExecutorConfiguration, sqlExecutorConfigureOptions); services.AddSQLExecutor(sqlExecutorConfiguration, sqlExecutorConfigureOptions);

View File

@ -0,0 +1,7 @@
using EnvelopeGenerator.Application.Contracts.SQLExecutor;
namespace EnvelopeGenerator.Infrastructure.Executor;
public class EnvelopeReceiverExecutor: IEnvelopeReceiverExecutor
{
}