Add DelayMilliseconds property to WorkerOptions
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.
This commit is contained in:
@@ -1,10 +1,21 @@
|
||||
using EnvelopeGenerator.ServiceHost.Jobs.FinalizeDocument;
|
||||
using System.Drawing;
|
||||
|
||||
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 string GdPictureLicenseKey { get; set; } = null!;
|
||||
|
||||
public PDFBurnerOptions PdfBurner { get; set; } = new();
|
||||
|
||||
Reference in New Issue
Block a user