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
StartTextPositionEndTextPosition
Fields
Empty
Empty/no selection
public static readonly TextSelection Empty
Field Value
Properties
End
public TextPosition End { get; init; }
Property Value
IsEmpty
Gets whether this selection is empty
public bool IsEmpty { get; }
Property Value
NormalizedEnd
Gets the normalized end (later position)
public TextPosition NormalizedEnd { get; }
Property Value
NormalizedStart
Gets the normalized start (earlier position)
public TextPosition NormalizedStart { get; }
Property Value
Start
public TextPosition Start { get; init; }