DocumentRange
Namespace: Hex1b.Documents
Assembly: Hex1b.dll
Represents a range in a document defined by start and end offsets.
public readonly struct DocumentRange : IEquatable<DocumentRange>Implements
Constructors
DocumentRange(DocumentOffset, DocumentOffset)
Parameters:
start(DocumentOffset):end(DocumentOffset):
public DocumentRange(DocumentOffset start, DocumentOffset end)Properties
End
Returns: DocumentOffset
public DocumentOffset End { get; }IsEmpty
Returns: Boolean
public bool IsEmpty { get; }Length
Returns: Int32
public int Length { get; }Start
Returns: DocumentOffset
public DocumentOffset Start { get; }Methods
Contains(DocumentOffset)
Parameters:
offset(DocumentOffset):
Returns: Boolean
public bool Contains(DocumentOffset offset)Equals(DocumentRange)
Indicates whether the current object is equal to another object of the same type.
Parameters:
other(DocumentRange): An object to compare with this object.
Returns: Boolean
true if the current object is equal to the other parameter; otherwise, false.
public bool Equals(DocumentRange other)Equals(object?)
Indicates whether this instance and a specified object are equal.
Parameters:
obj(Object): The object to compare with the current instance.
Returns: Boolean
true if obj and this instance are the same type and represent the same value; otherwise, false.
public override bool Equals(object? obj)GetHashCode()
Returns the hash code for this instance.
Returns: Int32
A 32-bit signed integer that is the hash code for this instance.
public override int GetHashCode()Overlaps(DocumentRange)
Parameters:
other(DocumentRange):
Returns: Boolean
public bool Overlaps(DocumentRange other)ToString()
Returns the fully qualified type name of this instance.
Returns: String
The fully qualified type name.
public override string ToString()Members
operator !=(DocumentRange, DocumentRange)
Parameters:
left(DocumentRange):right(DocumentRange):
Returns: Boolean
public static bool operator !=(DocumentRange left, DocumentRange right)operator ==(DocumentRange, DocumentRange)
Parameters:
left(DocumentRange):right(DocumentRange):
Returns: Boolean
public static bool operator ==(DocumentRange left, DocumentRange right)