New to Telerik UI for WPFStart a free 30-day trial

Represents a text snapshot span.

Definition

Namespace:Telerik.Windows.SyntaxEditor.Core.Text

Assembly:Telerik.Windows.SyntaxEditor.Core.dll

Syntax:

C#
public class TextSnapshotSpan

Inheritance: objectTextSnapshotSpan

Constructors

Initializes a new instance of the TextSnapshotSpan class.

C#
public TextSnapshotSpan(TextSnapshot textSnapshot, Span span)
Parameters:textSnapshotTextSnapshotspanSpan

Properties

Gets the end of the span.

C#
public int End { get; }

Gets a flag whether the span is empty.

C#
public bool IsEmpty { get; }

Gets the length of the span.

C#
public int Length { get; }

Gets the snapshot.

C#
public TextSnapshot Snapshot { get; }

Gets the span.

C#
public Span Span { get; }

Gets the start of the span.

C#
public int Start { get; }

Methods

Equals implementation.

C#
public override bool Equals(object obj)
Parameters:objobjectReturns:

bool

Overrides: object.Equals(object)

Gets the hash code of this instance.

C#
public override int GetHashCode()
Returns:

int

Overrides: object.GetHashCode()

Gets the text from the snapshot.

C#
public string GetText()
Returns:

string

Converts this instance to normalized collection.

C#
public NormalizedSnapshotSpanCollection ToNormalizedCollection()
Returns:

NormalizedSnapshotSpanCollection

Operators

Implementation of != operator.

C#
public static bool operator !=(TextSnapshotSpan left, TextSnapshotSpan right)
Parameters:leftTextSnapshotSpanrightTextSnapshotSpanReturns:

bool

Implementation of == operator.

C#
public static bool operator ==(TextSnapshotSpan left, TextSnapshotSpan right)
Parameters:leftTextSnapshotSpanrightTextSnapshotSpanReturns:

bool