Skip to content

DocumentRange

Namespace: Hex1b.Documents

Assembly: Hex1b.dll

Represents a range in a document defined by start and end offsets.

csharp
public readonly struct DocumentRange : IEquatable<DocumentRange>

Implements

Constructors

DocumentRange(DocumentOffset, DocumentOffset)

Parameters:

csharp
public DocumentRange(DocumentOffset start, DocumentOffset end)

Properties

End

Returns: DocumentOffset

csharp
public DocumentOffset End { get; }

IsEmpty

Returns: Boolean

csharp
public bool IsEmpty { get; }

Length

Returns: Int32

csharp
public int Length { get; }

Start

Returns: DocumentOffset

csharp
public DocumentOffset Start { get; }

Methods

Contains(DocumentOffset)

Parameters:

Returns: Boolean

csharp
public bool Contains(DocumentOffset offset)

Equals(DocumentRange)

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

Parameters:

Returns: Boolean

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

csharp
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.

csharp
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.

csharp
public override int GetHashCode()

Overlaps(DocumentRange)

Parameters:

Returns: Boolean

csharp
public bool Overlaps(DocumentRange other)

ToString()

Returns the fully qualified type name of this instance.

Returns: String

The fully qualified type name.

csharp
public override string ToString()

Members

operator !=(DocumentRange, DocumentRange)

Parameters:

Returns: Boolean

csharp
public static bool operator !=(DocumentRange left, DocumentRange right)

operator ==(DocumentRange, DocumentRange)

Parameters:

Returns: Boolean

csharp
public static bool operator ==(DocumentRange left, DocumentRange right)

Released under the MIT License.