refactor(BurnPdfCommand): add extension methods for ISender

- Introduce BurnPdfCommandExtensions to simplify sending BurnPdfCommand via ISender
- Enables calling `sender.BurnPdf(envelopeId, cancel)` or `sender.BurnPdf(envelopeUuid, cancel)`
- No changes to the underlying PDF burning logic in BurnPdfCommandHandler
This commit is contained in:
2025-11-10 14:00:21 +01:00
parent 495adb8c31
commit 8aea3c8301
2 changed files with 28 additions and 5 deletions

View File

@@ -11,14 +11,11 @@ namespace EnvelopeGenerator.Finalizer.Job
{
private readonly ILogger<FinishEnvelopeJob> _logger;
private readonly GdPictureOptions _gdPictureOptions;
private readonly IMediator _mediator;
public FinishEnvelopeJob(ILogger<FinishEnvelopeJob> logger, IOptions<GdPictureOptions> gdPictureOptions, IMediator mediator)
public FinishEnvelopeJob(ILogger<FinishEnvelopeJob> logger, IMediator mediator)
{
_logger = logger;
_gdPictureOptions = gdPictureOptions.Value;
_mediator = mediator;
}
@@ -28,7 +25,7 @@ namespace EnvelopeGenerator.Finalizer.Job
var envelopes = await _mediator.Send(new ReadEnvelopeQuery()
{
Status = new() { Include = [EnvelopeStatus.EnvelopeCompletelySigned] },
Status = new() { Include = [ EnvelopeStatus.EnvelopeCompletelySigned ] },
HasDocResult = false
}, cancel);