Documentation
Table of Contents

Class DocumentVersion

Namespace
IntentSharp.Documents
Assembly
IntentSharp.dll

One stored version of a document in an IDocumentStore: its sequence, the hash of its text, who wrote it and why, and whether it is the document's running version. A store returns a new instance from every call, so an instance describes the version as it was when the call returned.

public sealed class DocumentVersion
Inheritance
object
DocumentVersion
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Extension Methods

Constructors

DocumentVersion()

Creates a version description; a store sets every property.

Properties

Author

Who wrote this version.

BasedOn

The running sequence the author based this version on, as given in BasedOn; null when the save named none.

ContentHash

The content hash is a short prefix that names its scheme, a colon, and a lower-case hexadecimal digest of the version's text, encoded as UTF-8 exactly as it was saved. The hash is over the text, not over a parsed form, so a change of white space or of key order changes it.

CreatedAt

When the store saved the version.

Id

The document this is a version of.

IsRunning

True when this is the document's running version, the one a read without a sequence returns. A document has at most one.

LastActivatedAt

When this version last became the running version; null when it never has. The values are strictly increasing within one document, even for two activations within one tick of the store's clock, so they order activations.

Reason

Why the version was written, as the author gave it; null when no reason was given.

Rejected

True when the version was marked rejected (MarkRejectedAsync(DocumentId, long, string, CancellationToken)); a rejected version is never activated.

RejectionReason

Why the version was rejected; null when it is not.

Sequence

The version's number within its document: 1 for the first save, then increasing by one per save. A store never reuses a sequence.