Class TextSnapshot
Represents a snapshot of the text.
Inheritance
Inherited Members
Namespace: Telerik.WinForms.SyntaxEditor.Core.Text
Assembly: Telerik.WinControls.SyntaxEditor.dll
Syntax
public class TextSnapshot
Properties
Item[Int32]
Gets an index-based char.
Declaration
public char this[int position] { get; }
Parameters
System.Int32
position
|
Property Value
System.Char
|
Length
Gets the length of the text.
Declaration
public int Length { get; }
Property Value
System.Int32
|
LineCount
Gets the count of the lines.
Declaration
public int LineCount { get; }
Property Value
System.Int32
|
Lines
Gets the lines.
Declaration
public IEnumerable<TextSnapshotLine> Lines { get; }
Property Value
System.Collections.Generic.IEnumerable<TextSnapshotLine>
|
Span
TextDocument
Gets the text document.
Declaration
public TextDocument TextDocument { get; }
Property Value
TextDocument
|
Version
Gets the version of the snapshot.
Declaration
public TextVersion Version { get; }
Property Value
TextVersion
|
Methods
GetLineFromLineNumber(Int32)
Gets the snapshot line number from the line number.
Declaration
public TextSnapshotLine GetLineFromLineNumber(int lineNumber)
Parameters
System.Int32
lineNumber
|
Returns
TextSnapshotLine
|
GetLineFromPosition(Int32)
Gets the snapshot line number from the given position.
Declaration
public TextSnapshotLine GetLineFromPosition(int position)
Parameters
System.Int32
position
|
Returns
TextSnapshotLine
|
GetLineNumberFromPosition(Int32)
Gets the line number from the given position.
Declaration
public int GetLineNumberFromPosition(int position)
Parameters
System.Int32
position
|
Returns
System.Int32
|
GetText()
Gets the text of this snapshot instance.
Declaration
public string GetText()
Returns
System.String
|
GetText(Span)
Gets the text of the given span.
Declaration
public string GetText(Span span)
Parameters
Span
span
|
Returns
System.String
|