The GdPictureLicenseKey property was removed from the WorkerOptions class as it is no longer needed. This change helps to simplify the configuration and reduce unused properties.
The ExecuteAsync method in FinalizeDocumentJob.cs no longer retrieves the GdPicture license key, as it is not used in this part of the code. This helps clean up unnecessary code and improves maintainability.
Added InitialJobState as a Dictionary<string, State> with an empty default, and introduced a non-nullable GdPictureLicenseKey property to the WorkerOptions class. These additions support initial job state configuration and GdPicture licensing.
Introduced JobStateManager class to manage job states using a ConcurrentDictionary, supporting thread-safe get/set operations per job type. Added State enum with Running and Stopped values. Allows optional initial state dictionary for job states.
Introduced a configurable DelayMilliseconds property to the WorkerOptions class with validation to ensure the value is at least 1 millisecond. This allows for customizable delay settings in worker operations.
Removed MediatorGetOrContext.cs, eliminating the fluent API for handling null or empty MediatR responses with custom exceptions. Added two ExecuteAsync overloads to FinalizeDocumentJob: one for processing a single EnvelopeDto and another for processing all envelopes with the EnvelopeCompletelySigned status.
Refactored ActionService and FinalizeDocumentJob to use EnvelopeDto and ReceiverDto in place of domain entities. Updated method signatures, internal logic, and envelope receiver handling to operate on DTOs. Improved logging, removed obsolete code, and added necessary using statements for DTO namespaces. Also updated document retrieval logic and removed null-conditional operator from actionService calls.
Updated ReportCreator and ReportItem to accept EnvelopeDto
instead of Envelope, promoting better separation of concerns
and improved data handling via DTOs.
The Debug property, previously marked as obsolete in WorkerOptions, has been removed. Debugging should now be managed through ILogger-based logging instead of this flag.
Removed the deprecated ReportModel class and its List method, along with its registration in the dependency injection setup. This cleanup reflects the migration to EnvelopeReport mediator queries.
Moved mapping logic from ReportCreator.ToReportItem to a new constructor in ReportItem, improving encapsulation and simplifying report generation. Updated usings to remove unused and add necessary dependencies.
Removed ILogger dependency and all related logging from ReportCreator. Inlined DoCreateReport into CreateReportAsync and eliminated the try-catch block, allowing exceptions to propagate naturally. Improved the error message for missing report data. The class is now more focused and streamlined.
Replaces obsolete DataTable-based logic in ReportCreator with async repository queries for EnvelopeReport entities. Refactors ReportItem to use explicit header and detail fields, removing legacy Envelope references. Updates report designer bindings to match new ReportItem properties. Improves exception handling and overall type safety.
Switch to a designer-generated DevExpress XtraReport for envelope history, replacing the previous manual layout. Added designer (.Designer.cs), resource (.resx), and updated code-behind (.cs) files. Updated the project file to include new report assets. Changed report generation to use the new async API. This modernizes the report, improves maintainability, and enhances appearance.
Replaced DigitalData.Modules.Database with EnvelopeGenerator.ServiceHost.Jobs.Infrastructure in using statements and class namespaces. All database operations are now organized under the new namespace for better clarity and project structure.
Added DevExpress.Reporting.Core package reference. Refactored rptEnvelopeHistory to inherit from XtraReport and build its layout programmatically using DevExpress bands, tables, and styling. The report now uses A4 paper size, custom margins, and DevExpress UI components for rendering.
Removed unused constructor parameters from FinalizeDocumentJob for cleaner dependency injection. Updated actionService.FinalizeEnvelope to accept a cancellation token. Added missing using directive for Microsoft.Extensions.Options.
Updated ReportCreator constructor to require an IRepository<EnvelopeReport> parameter, enabling direct access to envelope report data within the class. This change prepares the class for future data operations involving envelope reports.
Removed the deprecated State class and its properties from the codebase. Also removed State from the dependency injection configuration, as it is no longer used.
Removed exception throwing and logging for failed report creation, email sending, and envelope finalization in FinalizeDocumentJob. Now, these methods are called without checking their return values. Also improved exception message for file export to include envelope Id and added null-forgiving operator to _config.ExportPath.
Replaced manual SQL and file read with async repository update for saving final document bytes. Removed obsolete helper methods and cleaned up unused imports for improved maintainability and testability.
Removed the SendFinalEmailWithAttachment method and all references to it from SendFinalEmailToCreator and SendFinalEmailToReceivers. The logic for determining email attachments based on FinalEmailType is no longer used. Other functionality in these methods remains unchanged.
Removed BurnAnnotationsToPdf, GetEnvelopeData, and GetAnnotationData from FinalizeDocumentJob. These methods handled document reading, annotation retrieval, and PDF annotation burning. This change reflects a refactor or shift in document processing responsibilities.
Refactored FinalizeDocumentJob to make the Finalize method asynchronous and fetch document annotations from docStatusRepo instead of using GetEnvelopeData. Updated constructor to inject IRepository<Domain.Entities.DocumentStatus>. Improved logging and removed obsolete envelopeData checks.
Removed numerous debug-level log statements to reduce log verbosity and focus on warnings and information logs. Updated some log messages to use interpolated strings for clarity. Refactored GetAnnotationData to use C# collection expressions for improved code conciseness.
Added RethrowOnError property to control exception rethrowing during envelope finalization. Exceptions are now logged as errors and, if RethrowOnError is true, rethrown to enable stricter error handling and halt execution on failure.
Extracted envelope finalization logic from the foreach loop into a new private Finalize(Envelope envelope) method. This improves code readability and maintainability by encapsulating all steps of the finalization process without changing functionality.
Refactored ActionService to use constructor injection for IRepository<History>. Updated all public methods to accept optional CancellationToken parameters for improved cancellation support. Added necessary using directives. Class remains a placeholder with [Obsolete] attributes and NotImplementedException.
Added an XML summary comment to the ActionService class to indicate it is being migrated from EnvelopeGenerator.CommonServices.Services.ActionService. This provides clarity on the class's origin and intended purpose; no functional changes were made.
Move per-envelope logic in FinalizeDocumentJob into its own try-catch block within the foreach loop. This ensures that exceptions in processing one envelope do not halt the processing of others, improving robustness and fault tolerance. Removed the outer try-catch-finally block and updated logging to reflect per-envelope and overall job status.
Replaced raw SQL and DataTable usage with Entity Framework LINQ queries for retrieving completed envelopes. The process now works directly with envelope entities, improving code readability, maintainability, and leveraging EF's querying capabilities. Logging and error handling have been updated to use envelope properties directly.
Deleted the EnvelopeModel class, which included the GetById method for retrieving Envelope entities from the database. Also removed related using directives and namespace declarations. This cleanup eliminates unused or redundant code.
Replaced EnvelopeModel with IRepository<Envelope> in FinalizeDocumentJob, switching to dependency-injected, repository-based, and asynchronous data access using Entity Framework. Updated envelope retrieval to use SingleOrDefaultAsync, improving maintainability and scalability. Added necessary using directives to support these changes.
The TempFiles class, including its TempPath property, constructor,
and methods (Create, CleanUpFiles, CleanUp), is now marked with
the [Obsolete("Use memory cache instead of temp files.")] attribute.
This deprecates the use of temp files in favor of a memory cache
approach for future development.
Deleted ConfigModel.cs and DbConfig.cs, removing both the configuration loading logic and the DbConfig data structure from the codebase. This eliminates database-driven configuration management functionality.
Switched FinalizeDocumentJob to use MediatR for async config retrieval, replacing direct model access. Updated _config type to ConfigDto?, injected IMediator, and removed obsolete DbConfig references. Cleaned up ExecuteAsync method for improved clarity and decoupling.
DocumentPathOrigin property and all related code references have
been removed from DbConfig, ConfigModel, and FinalizeDocumentJob.
DocumentPath is now used exclusively for document path handling,
simplifying configuration and reducing redundancy.
Deleted BaseModel and BaseService classes, along with their
associated using statements and members. This removes the
abstraction layers for database, logging, and state management
from EnvelopeGenerator.ServiceHost.Jobs.
Refactored FinalizeDocumentJob to use dependency injection for all major services and models, replacing manual initialization. Updated all logging to use injected ILogger with structured messages. Removed obsolete initialization methods. Marked class as [Obsolete] pending migration from CommonServices.Jobs. Improved exception handling and code clarity for better testability and maintainability.
Refactored ReportModel to use MSSQLServer Database via primary constructor, removed BaseModel inheritance and State-based constructor. Marked class and List method as obsolete, recommending EnvelopeReport mediator queries. Updated namespace and using directives.
State is now marked obsolete in favor of DbContext. Removed LogConfig property and its using directive to simplify the class. Minor formatting adjustments applied.
Removed BaseModel inheritance and switched to constructor injection for MSSQLServer and ILogger dependencies. Updated using directives and replaced Logger.Error with Logger.LogError. Removed obsolete State-based constructor.
Refactored ConfigModel to use dependency injection for MSSQLServer and ILogger, removed BaseModel inheritance and constructor. Updated using directives and replaced Logger.Error with Logger.LogError for better error handling.
ActionService is now marked obsolete as a placeholder. Its constructor was removed, and all methods now throw NotImplementedException instead of returning true. Each method is also marked obsolete, indicating logic should be migrated from CommonServices.Jobs.
Deleted Base.cs and Logging.cs, removing BaseClass, logging configuration, logger classes, and related extension methods for enums and DataRow. These foundational and logging utilities are no longer part of the project.
Replaced LogConfig and direct connection string injection with IConfiguration. Connection string is now retrieved from configuration using the "Default" key. Removed LogConfig dependency and related code.
Refactored ReportCreator to use constructor injection for dependencies and removed BaseClass inheritance. Marked legacy methods and fields as [Obsolete] to indicate migration to mediator queries. Improved logging by switching to Logger.LogError and updating string interpolation. Removed unused usings and added MergeEnvelope method (also obsolete). These changes modernize the class and highlight areas for further architectural improvement.
Replaced internal construction of dependencies with injected EGDbContext, ILogger, LicenseManager, AnnotationManager, and WorkerOptions. Removed BaseClass inheritance and internal fields. Updated annotation and PDF burning methods to use injected instances. Switched configuration from PDFBurnerParams to WorkerOptions.PDFBurnerOptions. Improves testability and aligns with DI best practices.
PDFMerger now uses dependency injection for LicenseManager and
AnnotationManager, improving modularity and testability. Removed
inheritance from BaseClass and cleaned up unused usings.
Removed BaseClass inheritance and legacy logging dependencies. Updated TempFiles to use ILogger<TempFiles> via dependency injection, replaced Logger.Error and Logger.LogDebug with structured logging calls. Cleaned up unused usings and improved log message formatting.