Table of Contents

Struct DocumentRevision

Namespace
TextEdit.Core
Assembly
TextEdit.Core.dll

An opaque immutable revision of one document. The default value cannot authorize an edit.

public readonly struct DocumentRevision : IEquatable<DocumentRevision>
Implements
Inherited Members

Properties

IsValid

Gets whether this revision belongs to a live document.

public bool IsValid { get; }

Property Value

bool

Version

Gets the monotonically increasing document version.

public long Version { get; }

Property Value

long

Methods

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Equals(DocumentRevision)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(DocumentRevision other)

Parameters

other DocumentRevision

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Operators

operator ==(DocumentRevision, DocumentRevision)

Compares the owning document and version.

public static bool operator ==(DocumentRevision left, DocumentRevision right)

Parameters

left DocumentRevision
right DocumentRevision

Returns

bool

operator !=(DocumentRevision, DocumentRevision)

Compares the owning document and version.

public static bool operator !=(DocumentRevision left, DocumentRevision right)

Parameters

left DocumentRevision
right DocumentRevision

Returns

bool