feat(dependency-injection): add optional usePdfBurner flag to AddServices
- Updated EGConfiguration.AddServices to accept a new `usePdfBurner` boolean parameter. - Pass `usePdfBurner` through to AddEnvelopeGeneratorServices to enable optional PDF burner functionality. - Maintains existing behavior when parameter is not provided (default false).
This commit is contained in:
parent
86c0a65540
commit
495adb8c31
@ -70,10 +70,10 @@ public static class DependencyInjection
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EGConfiguration AddServices(IConfiguration config)
|
public EGConfiguration AddServices(IConfiguration config, bool usePdfBurner = false)
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0618
|
#pragma warning disable CS0618
|
||||||
_serviceRegs.Enqueue(s => s.AddEnvelopeGeneratorServices(config));
|
_serviceRegs.Enqueue(s => s.AddEnvelopeGeneratorServices(config, usePdfBurner));
|
||||||
#pragma warning restore CS0618
|
#pragma warning restore CS0618
|
||||||
_addingStatus[nameof(AddServices)] = true;
|
_addingStatus[nameof(AddServices)] = true;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@ -92,7 +92,7 @@ try
|
|||||||
.EnableDetailedErrors();
|
.EnableDetailedErrors();
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.AddServices(config)
|
.AddServices(config, true)
|
||||||
);
|
);
|
||||||
#endregion Add DB Context, EG Inf. and Services
|
#endregion Add DB Context, EG Inf. and Services
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user