Refactor to use LicenseManagerFactory in PDF jobs

Replaced direct LicenseManager dependencies with LicenseManagerFactory in PDFBurner and PDFMerger classes. This change improves license management flexibility and encapsulation, allowing for better handling of license-related logic.
This commit is contained in:
2026-04-14 21:05:08 +02:00
parent 1f7eb5d4ea
commit a3f404b9ae
2 changed files with 6 additions and 13 deletions

View File

@@ -1,4 +1,5 @@
using EnvelopeGenerator.ServiceHost.Exceptions;
using EnvelopeGenerator.ServiceHost.Jobs;
using GdPicture14;
using Microsoft.Extensions.Options;
@@ -7,16 +8,16 @@ namespace EnvelopeGenerator.ServiceHost.Jobs.FinalizeDocument;
public class PDFMerger
{
private readonly AnnotationManager _manager;
private readonly LicenseManager _licenseManager;
private readonly LicenseManagerFactory _licenseManagerFactory;
private const bool AllowRasterization = true;
private const bool AllowVectorization = true;
private readonly PdfConversionConformance _pdfaConformanceLevel = PdfConversionConformance.PDF_A_1b;
public PDFMerger(LicenseManager licenseManager, AnnotationManager annotationManager)
public PDFMerger(LicenseManagerFactory licenseManagerFactory, AnnotationManager annotationManager)
{
_licenseManager = licenseManager;
_licenseManagerFactory = licenseManagerFactory;
_manager = annotationManager;
}