Table of Contents

Struct TextRange

Namespace
RDCore.SDK.Assistant
Assembly
RDCore.SDK.Protocol.dll

A range of the text of a document, 1-based (TextPosition): where it starts, and the position just after its last character.

public readonly record struct TextRange : IEquatable<TextRange>
Implements
Inherited Members

Constructors

TextRange(TextPosition, TextPosition)

A range of the text of a document, 1-based (TextPosition): where it starts, and the position just after its last character.

public TextRange(TextPosition Start, TextPosition End)

Parameters

Start TextPosition

Where the range starts.

End TextPosition

The position just after its last character; Start for an empty range.

Properties

End

The position just after its last character; Start for an empty range.

public TextPosition End { get; init; }

Property Value

TextPosition

Start

Where the range starts.

public TextPosition Start { get; init; }

Property Value

TextPosition

Methods

Of(SourceRange)

The range a 0-based range is.

public static TextRange Of(SourceRange range)

Parameters

range SourceRange

The 0-based range.

Returns

TextRange

The same range, 1-based.

ToSourceRange()

The 0-based range this range is.

public SourceRange ToSourceRange()

Returns

SourceRange

The same range, 0-based.

Exceptions

ArgumentOutOfRangeException

A line or a column is less than 1.