Refactor envelope creation methods and parameter handling
- Updated `Extension.cs` to remove old methods and introduce a new parameter creation method. - Modified `IEnvelopeExecutor.cs` to change `CreateEnvelopeAsync` signature for clarity. - Added a consistent `CreateParmas` method in `EnvelopeCreateReadSQL.cs`. - Changed service registration in `DependencyExtensions.cs` from singleton to scoped. - Revised `CreateEnvelopeAsync` in `EnvelopeExecutor.cs` to utilize the new parameter structure and removed user addition logic. These changes enhance code clarity, maintainability, and consistency in parameter handling.
This commit is contained in:
@@ -82,8 +82,8 @@ public static class DIExtensions
|
||||
SetDapperTypeMap<DocumentReceiverElement>();
|
||||
SetDapperTypeMap<DocumentStatus>();
|
||||
|
||||
services.AddSingleton<IEnvelopeExecutor, EnvelopeExecutor>();
|
||||
services.AddSingleton<IEnvelopeReceiverExecutor, EnvelopeReceiverExecutor>();
|
||||
services.AddScoped<IEnvelopeExecutor, EnvelopeExecutor>();
|
||||
services.AddScoped<IEnvelopeReceiverExecutor, EnvelopeReceiverExecutor>();
|
||||
|
||||
if (sqlExecutorConfiguration is not null || sqlExecutorConfigureOptions is not null)
|
||||
services.AddSQLExecutor(sqlExecutorConfiguration, sqlExecutorConfigureOptions);
|
||||
|
||||
Reference in New Issue
Block a user