Documentation
Table of Contents

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.

ValueTask<DocumentVersion> MarkRejectedAsync(DocumentId id, long sequence, string reason, CancellationToken ct = default)

Parameters

id DocumentId

The document.

sequence long

The version to reject.

reason string

Why the version is rejected.

ct CancellationToken

Cancels the call.

Returns

ValueTask<DocumentVersion>

Exceptions

ArgumentException

reason is null or blank, or id is a default DocumentId, which names no document.

InvalidOperationException

The document has no version with that sequence, or the version is the running one.