Remove MediatorGetOrContext; add ExecuteAsync overloads
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.
This commit is contained in:
@@ -60,6 +60,8 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, ILogger<Finali
|
||||
}
|
||||
}
|
||||
|
||||
public Task ExecuteAsync(EnvelopeDto envelope, CancellationToken cancel = default) => ExecuteAsync([envelope], cancel);
|
||||
|
||||
public async Task ExecuteAsync(CancellationToken cancel = default)
|
||||
{
|
||||
var envelopes = await mediator.Send(new ReadEnvelopeQuery()
|
||||
|
||||
Reference in New Issue
Block a user