Table of Contents

Class TextSelection

Namespace
SharpConsoleUI.Core
Assembly
SharpConsoleUI.dll

Represents a text selection (start and end positions)

public record TextSelection : IEquatable<TextSelection>
Inheritance
TextSelection
Implements
Inherited Members

Constructors

TextSelection(TextPosition, TextPosition)

Represents a text selection (start and end positions)

public TextSelection(TextPosition Start, TextPosition End)

Parameters

Start TextPosition
End TextPosition

Fields

Empty

Empty/no selection

public static readonly TextSelection Empty

Field Value

TextSelection

Properties

End

public TextPosition End { get; init; }

Property Value

TextPosition

IsEmpty

Gets whether this selection is empty

public bool IsEmpty { get; }

Property Value

bool

NormalizedEnd

Gets the normalized end (later position)

public TextPosition NormalizedEnd { get; }

Property Value

TextPosition

NormalizedStart

Gets the normalized start (earlier position)

public TextPosition NormalizedStart { get; }

Property Value

TextPosition

Start

public TextPosition Start { get; init; }

Property Value

TextPosition