Documentation
Table of Contents

Method ActivateAsync

Namespace
IntentSharp.Documents
Assembly
IntentSharp.dll

ActivateAsync(DocumentId, long, CancellationToken)

Makes a stored version the document's running version, as a revert to an older version or the promotion of a version saved without activation. Activating the running version changes nothing and returns it.

public ValueTask<DocumentVersion> ActivateAsync(DocumentId id, long sequence, CancellationToken ct = default)

Parameters

id DocumentId

The document.

sequence long

The version to run.

ct CancellationToken

Cancels the call.

Returns

ValueTask<DocumentVersion>

Exceptions

ArgumentException

A default DocumentId, which names no document.

InvalidOperationException

The document has no version with that sequence, or the version is rejected; the message says which, with the rejection reason.