Method MarkRejectedAsync
- Namespace
- IntentSharp.Documents
- Assembly
- IntentSharp.dll
MarkRejectedAsync(DocumentId, long, string, CancellationToken)
Marks a stored version rejected, with the reason: a version that failed validation, such as an external edit the library refused. The version stays in the history and can still be read by its sequence, but it is never activated. Marking a rejected version again replaces its reason.
public ValueTask<DocumentVersion> MarkRejectedAsync(DocumentId id, long sequence, string reason, CancellationToken ct = default)
Parameters
idDocumentIdThe document.
sequencelongThe version to reject.
reasonstringWhy the version is rejected.
ctCancellationTokenCancels the call.
Returns
- ValueTask<DocumentVersion>
Exceptions
- ArgumentException
reasonis null or blank, oridis a default DocumentId, which names no document.- InvalidOperationException
The document has no version with that sequence, or the version is the running one.