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
Version
Gets the monotonically increasing document version.
public long Version { get; }
Property Value
Methods
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand 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
otherDocumentRevisionAn object to compare with this object.
Returns
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
leftDocumentRevisionrightDocumentRevision
Returns
operator !=(DocumentRevision, DocumentRevision)
Compares the owning document and version.
public static bool operator !=(DocumentRevision left, DocumentRevision right)
Parameters
leftDocumentRevisionrightDocumentRevision