Pass cancellationToken to next() in pipeline behaviors
Updated the `Handle` method in multiple classes implementing `IPipelineBehavior<SignCommand, Unit>` to pass the `cancellationToken` parameter to the `next()` method. This change ensures consistent propagation of the `cancellationToken` through the pipeline, enabling proper handling of cancellation requests during asynchronous operations. Modified files: - AnnotationBehavior.cs - DocStatusBehavior.cs - HistoryBehavior.cs - SendSignedMailBehavior.cs
This commit is contained in:
@@ -36,6 +36,6 @@ public class AnnotationBehavior : IPipelineBehavior<SignCommand, Unit>
|
||||
if (request.PsPdfKitAnnotation is PsPdfKitAnnotation annot)
|
||||
await _repo.CreateAsync(annot.Structured, cancellationToken);
|
||||
|
||||
return await next();
|
||||
return await next(cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,6 @@ public class DocStatusBehavior : IPipelineBehavior<SignCommand, Unit>
|
||||
: BlankAnnotationJson
|
||||
}, cancellationToken);
|
||||
|
||||
return await next();
|
||||
return await next(cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,6 @@ public class HistoryBehavior : IPipelineBehavior<SignCommand, Unit>
|
||||
Status = EnvelopeStatus.DocumentSigned,
|
||||
}, cancellationToken);
|
||||
|
||||
return await next();
|
||||
return await next(cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class SendSignedMailBehavior : IPipelineBehavior<SignCommand, Unit>
|
||||
|
||||
await _emailOutRepo.CreateAsync(emailOut, cancellationToken);
|
||||
|
||||
return await next();
|
||||
return await next(cancellationToken);
|
||||
}
|
||||
|
||||
private Dictionary<string, string> CreatePlaceHolders(SignCommand request)
|
||||
|
||||
Reference in New Issue
Block a user