Class
TextSnapshotSpan

Represents a text snapshot span.

Definition

Namespace:Telerik.Windows.SyntaxEditor.Core.Text

Assembly:Telerik.Windows.SyntaxEditor.Core.dll

Syntax:

cs-api-definition
public class TextSnapshotSpan

Inheritance: objectTextSnapshotSpan

Constructors

TextSnapshotSpan(TextSnapshot, Span)

Initializes a new instance of the TextSnapshotSpan class.

Declaration

cs-api-definition
public TextSnapshotSpan(TextSnapshot textSnapshot, Span span)

Parameters

textSnapshot

TextSnapshot

span

Span

Properties

End

Gets the end of the span.

Declaration

cs-api-definition
public int End { get; }

Property Value

int

IsEmpty

Gets a flag whether the span is empty.

Declaration

cs-api-definition
public bool IsEmpty { get; }

Property Value

bool

Length

Gets the length of the span.

Declaration

cs-api-definition
public int Length { get; }

Property Value

int

Snapshot

Gets the snapshot.

Declaration

cs-api-definition
public TextSnapshot Snapshot { get; }

Property Value

TextSnapshot

Span

Gets the span.

Declaration

cs-api-definition
public Span Span { get; }

Property Value

Span

Start

Gets the start of the span.

Declaration

cs-api-definition
public int Start { get; }

Property Value

int

Methods

Equals(object)

Equals implementation.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

Returns

bool

Overrides object.Equals(object)

GetHashCode()

Gets the hash code of this instance.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

Overrides object.GetHashCode()

GetText()

Gets the text from the snapshot.

Declaration

cs-api-definition
public string GetText()

Returns

string

ToNormalizedCollection()

Converts this instance to normalized collection.

Declaration

cs-api-definition
public NormalizedSnapshotSpanCollection ToNormalizedCollection()

Returns

NormalizedSnapshotSpanCollection

Operators

operator !=(TextSnapshotSpan, TextSnapshotSpan)

Implementation of != operator.

Declaration

cs-api-definition
public static bool operator !=(TextSnapshotSpan left, TextSnapshotSpan right)

Parameters

left

TextSnapshotSpan

right

TextSnapshotSpan

Returns

bool

operator ==(TextSnapshotSpan, TextSnapshotSpan)

Implementation of == operator.

Declaration

cs-api-definition
public static bool operator ==(TextSnapshotSpan left, TextSnapshotSpan right)

Parameters

left

TextSnapshotSpan

right

TextSnapshotSpan

Returns

bool