Commit Graph

19 Commits

Author SHA1 Message Date
2a5d953623 Add LoggerExtensions with LogError extension method
Created LoggerExtensions.cs in EnvelopeGenerator.ServiceHost.Extensions, introducing a LogError extension method for ILogger to simplify exception logging.
2026-02-25 16:40:40 +01:00
0aba9e91e2 Add DataRowExtensions for safe value retrieval with defaults
Introduced DataRowExtensions.cs with extension methods for DataRow:
- ItemEx<T>: Retrieves a value by column name with a default if missing or null.
- ItemEx (string): Overload for string values, using the generic method.
These methods help prevent errors when accessing missing or null columns.
2026-02-25 16:39:55 +01:00
1a0973075b Standardize error logging with LogError method
Replaced all usages of _logger?.Error with _logger?.LogError in FinalizeDocumentJob.cs. Renamed the Error method to LogError in Logging.cs for consistency. This change ensures uniform error logging across the codebase.
2026-02-25 13:43:51 +01:00
b8fd26611c Refactor Logger error handling and add extension method
Refactored Logger.Error(Exception) to use a new ILogger extension method, LogError, for improved error logging. Added an overloaded Error method to Logger for custom messages with exceptions. Introduced LoggerExtensions with a LogError extension for consistent exception logging.
2026-02-25 13:42:33 +01:00
0ca372bf45 Update logging methods to use standard naming conventions
Replaced custom Warn method with LogWarning in Logger class and updated usage in FinalizeDocumentJob. Added LogInformation and LogWarning methods for consistency with common logging practices. LogWarning now accepts an Exception as the first parameter, aligning with standard logging signatures.
2026-02-25 13:38:55 +01:00
5230076d5d Rename Logger.Warn to Logger.LogWarning throughout codebase
Replaces all usages of Logger.Warn with Logger.LogWarning for consistency with .NET logging conventions. Updates the Logger class method name and all related calls, with no changes to logic or parameters.
2026-02-25 13:37:50 +01:00
b28084bf19 Replace Info logging with LogInformation
Renamed all usages of the Info logging method to LogInformation across the codebase, including in the Logger class. This aligns logging with standard conventions and improves consistency with common logging frameworks.
2026-02-25 13:37:00 +01:00
cbc983e070 Rename Logger.Debug to Logger.LogDebug across codebase
Renamed the Logger.Debug method to Logger.LogDebug for improved clarity and consistency. Updated all usages in PDFBurner, ReportCreator, FinalizeDocumentJob, TempFiles, and Logging.cs. No changes to logging logic or other log levels.
2026-02-25 13:36:50 +01:00
3b06f3fdac Remove JobDataKeys.cs and its string constants
The JobDataKeys.cs file was deleted, including the static class JobDataKeys and its four string constants: GdPicture, LogConfig, Database, and PdfBurnerParams. This change removes unused or redundant job data key definitions from the codebase.
2026-02-25 13:34:04 +01:00
a12d74871d Refactor PDF burner options naming in WorkerOptions
Renamed WorkerOptions.PdfBurnerParams to PdfBurner and updated its type from PDFBurnerParams to PDFBurnerOptions. Also renamed the record type accordingly and updated all references in the codebase. No changes to the structure or default values of the options.
2026-02-25 13:33:39 +01:00
45b715ed74 Refactor job execution to remove Quartz and job runner
Simplify FinalizeDocumentJob execution by removing Quartz dependencies and the IFinalizeDocumentJobRunner abstraction. The job now uses an ExecuteAsync method with direct access to configuration and options via dependency injection. Worker is updated to call the job directly, and service registration is streamlined. This improves clarity and integration with .NET DI.
2026-02-25 13:29:00 +01:00
9d5e2e6ad2 Refactor FinalizeDocumentJob config to use WorkerOptions
Replaces JobOptions and PDFBurnerParams with a new WorkerOptions class that encapsulates all job configuration, including PDF burning parameters as a nested record. Updates service registration and job constructor to use IOptions<WorkerOptions>. Removes obsolete configuration classes and centralizes options management for improved maintainability.
2026-02-25 13:27:01 +01:00
c5d2d79563 Rename FinalizeDocumentJobOptions to JobOptions
Renamed the FinalizeDocumentJobOptions class to JobOptions. Added properties for ConnectionString, GdPictureLicenseKey, Debug, and PdfBurnerParams, with appropriate default values.
2026-02-25 11:55:35 +01:00
15d4573321 Übersetzendie FinalizeDocumentJob-Funktion des EnvelopeGenerator.Service-Projekts in C# und kopieren sie. 2026-02-25 11:52:31 +01:00
eb46590c1d Make worker delay configurable via appsettings.json
Refactored Worker to accept IConfiguration and read the delay interval from "Worker:DelayMilliseconds" in appsettings.json, replacing the previously hardcoded value. This allows the worker execution interval to be configured without code changes. Added a minimum delay safeguard and updated appsettings.json accordingly.
2026-02-23 17:17:27 +01:00
c93c32307a feat(FinalizeDocument): aus CommonJobs kopiert, mit einfachen Fehlerbehebungen unter Verwendung von Copilot
- Programmiersprache von VSC zu C# geändert
 - Framework von .NET Framework zu .NET geändert
2026-02-23 17:12:25 +01:00
b01c17ab18 Add custom exception classes and Extensions folder
Introduce four custom exceptions (BurnAnnotationException, CreateReportException, ExportDocumentException, MergeDocumentException) under EnvelopeGenerator.ServiceHost.Exceptions for improved error handling. Update the project file to include the new Extensions folder.
2026-02-23 16:09:11 +01:00
c8834dc3be Add Worker background service to log periodic messages
Added a Worker class in EnvelopeGenerator.ServiceHost that logs an informational message every second. Registered the Worker as a hosted service in Program.cs to run alongside the web API.
2026-02-23 11:10:15 +01:00
e385fdda95 Add EnvelopeGenerator.ServiceHost ASP.NET Core Web API project
Created a new EnvelopeGenerator.ServiceHost project targeting .NET 8.0. Set up minimal API host with controllers, Swagger/OpenAPI support, and development configuration files. Updated solution to include the new project with appropriate build settings.
2026-02-23 11:10:01 +01:00