Files
EnvelopeGenerator/EnvelopeGenerator.ServiceHost/Jobs/WorkerOptions.cs
TekH 8ca360d47e Add InitialJobState and GdPictureLicenseKey to WorkerOptions
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.
2026-04-13 16:29:14 +02:00

39 lines
1.0 KiB
C#

namespace EnvelopeGenerator.ServiceHost.Jobs;
public class WorkerOptions
{
private int _delayMilliseconds = 1000;
public int DelayMilliseconds
{
get => _delayMilliseconds;
set
{
if (value < 1)
throw new ArgumentOutOfRangeException(nameof(value), "Delay must be at least 1 millisecond.");
_delayMilliseconds = value;
}
}
public Dictionary<string, State> InitialJobState { get; set; } = [];
public string GdPictureLicenseKey { get; set; } = null!;
public PDFBurnerOptions PdfBurner { get; set; } = new();
public record PDFBurnerOptions
{
public List<string> IgnoredLabels { get; set; } = ["Date", "Datum", "ZIP", "PLZ", "Place", "Ort", "Position", "Stellung"];
public double TopMargin { get; set; } = 0.1;
public double YOffset { get; set; } = -0.3;
public string FontName { get; set; } = "Arial";
public int FontSize { get; set; } = 8;
public FontStyle FontStyle { get; set; } = FontStyle.Italic;
}
}