refactor: remove usePdfBurner parameter from AddEnvelopeGeneratorServices

This commit is contained in:
tekh 2025-11-12 16:55:06 +01:00
parent 50a372a224
commit 6195d99fab
3 changed files with 24 additions and 33 deletions

View File

@ -25,10 +25,9 @@ public static class DependencyInjection
/// </summary> /// </summary>
/// <param name="services"></param> /// <param name="services"></param>
/// <param name="config"></param> /// <param name="config"></param>
/// <param name="usePdfBurner"></param>
/// <returns></returns> /// <returns></returns>
[Obsolete("Use MediatR")] [Obsolete("Use MediatR")]
public static IServiceCollection AddEnvelopeGeneratorServices(this IServiceCollection services, IConfiguration config, bool usePdfBurner = false) public static IServiceCollection AddEnvelopeGeneratorServices(this IServiceCollection services, IConfiguration config)
{ {
//Inject CRUD Service and repositoriesad //Inject CRUD Service and repositoriesad
services.TryAddScoped<IConfigService, ConfigService>(); services.TryAddScoped<IConfigService, ConfigService>();
@ -53,8 +52,7 @@ public static class DependencyInjection
services.Configure<AuthenticatorParams>(config.GetSection(nameof(AuthenticatorParams))); services.Configure<AuthenticatorParams>(config.GetSection(nameof(AuthenticatorParams)));
services.Configure<TotpSmsParams>(config.GetSection(nameof(TotpSmsParams))); services.Configure<TotpSmsParams>(config.GetSection(nameof(TotpSmsParams)));
if (usePdfBurner) #region PDF Burner
{
services.Configure<PDFBurnerParams>(config.GetSection(nameof(PDFBurnerParams))); services.Configure<PDFBurnerParams>(config.GetSection(nameof(PDFBurnerParams)));
services.AddOptions<GdPictureParams>() services.AddOptions<GdPictureParams>()
.Configure((GdPictureParams opt, IServiceProvider provider) => .Configure((GdPictureParams opt, IServiceProvider provider) =>
@ -76,7 +74,7 @@ public static class DependencyInjection
_ = provider.GetRequiredService<LicenseManager>(); _ = provider.GetRequiredService<LicenseManager>();
return new AnnotationManager(); return new AnnotationManager();
}); });
} #endregion PDF Burner
services.AddHttpClientService<GtxMessagingParams>(config.GetSection(nameof(GtxMessagingParams))); services.AddHttpClientService<GtxMessagingParams>(config.GetSection(nameof(GtxMessagingParams)));
services.TryAddSingleton<ISmsSender, GTXSmsSender>(); services.TryAddSingleton<ISmsSender, GTXSmsSender>();

View File

@ -73,7 +73,7 @@ public static class DependencyInjection
public EGConfiguration AddServices(IConfiguration config, bool usePdfBurner = false) public EGConfiguration AddServices(IConfiguration config, bool usePdfBurner = false)
{ {
#pragma warning disable CS0618 #pragma warning disable CS0618
_serviceRegs.Enqueue(s => s.AddEnvelopeGeneratorServices(config, usePdfBurner)); _serviceRegs.Enqueue(s => s.AddEnvelopeGeneratorServices(config));
#pragma warning restore CS0618 #pragma warning restore CS0618
_addingStatus[nameof(AddServices)] = true; _addingStatus[nameof(AddServices)] = true;
return this; return this;

View File

@ -41,8 +41,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EnvelopeGenerator.Dependenc
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EnvelopeGenerator.Finalizer", "EnvelopeGenerator.Finalizer\EnvelopeGenerator.Finalizer.csproj", "{C4970E6C-DB2E-48C5-B3C5-2AF589405ED9}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EnvelopeGenerator.Finalizer", "EnvelopeGenerator.Finalizer\EnvelopeGenerator.Finalizer.csproj", "{C4970E6C-DB2E-48C5-B3C5-2AF589405ED9}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EnvelopeGenerator.Finalizer.Win", "EnvelopeGenerator.Finalizer.Win\EnvelopeGenerator.Finalizer.Win.csproj", "{F4844CA5-8747-F32F-E938-45859A2AA422}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -105,10 +103,6 @@ Global
{C4970E6C-DB2E-48C5-B3C5-2AF589405ED9}.Debug|Any CPU.Build.0 = Debug|Any CPU {C4970E6C-DB2E-48C5-B3C5-2AF589405ED9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4970E6C-DB2E-48C5-B3C5-2AF589405ED9}.Release|Any CPU.ActiveCfg = Release|Any CPU {C4970E6C-DB2E-48C5-B3C5-2AF589405ED9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C4970E6C-DB2E-48C5-B3C5-2AF589405ED9}.Release|Any CPU.Build.0 = Release|Any CPU {C4970E6C-DB2E-48C5-B3C5-2AF589405ED9}.Release|Any CPU.Build.0 = Release|Any CPU
{F4844CA5-8747-F32F-E938-45859A2AA422}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F4844CA5-8747-F32F-E938-45859A2AA422}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F4844CA5-8747-F32F-E938-45859A2AA422}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F4844CA5-8747-F32F-E938-45859A2AA422}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -131,7 +125,6 @@ Global
{211619F5-AE25-4BA5-A552-BACAFE0632D3} = {9943209E-1744-4944-B1BA-4F87FC1A0EEB} {211619F5-AE25-4BA5-A552-BACAFE0632D3} = {9943209E-1744-4944-B1BA-4F87FC1A0EEB}
{B97DE7DD-3190-4A84-85E9-E57AD735BE61} = {E3C758DC-914D-4B7E-8457-0813F1FDB0CB} {B97DE7DD-3190-4A84-85E9-E57AD735BE61} = {E3C758DC-914D-4B7E-8457-0813F1FDB0CB}
{C4970E6C-DB2E-48C5-B3C5-2AF589405ED9} = {E3C758DC-914D-4B7E-8457-0813F1FDB0CB} {C4970E6C-DB2E-48C5-B3C5-2AF589405ED9} = {E3C758DC-914D-4B7E-8457-0813F1FDB0CB}
{F4844CA5-8747-F32F-E938-45859A2AA422} = {E3C758DC-914D-4B7E-8457-0813F1FDB0CB}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {73E60370-756D-45AD-A19A-C40A02DACCC7} SolutionGuid = {73E60370-756D-45AD-A19A-C40A02DACCC7}