ITextSnapshot Interface

 

Provides read access to an immutable snapshot of a ITextBuffer that contains a sequence of Unicode characters.

Namespace:   Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

public interface ITextSnapshot

NameDescription
System_CAPS_pubpropertyContentType

Gets the IContentType of the TextBuffer when this snapshot was current.

System_CAPS_pubpropertyItem[Int32]

Gets one character at the specified position.

System_CAPS_pubpropertyLength

Gets the number of UTF-16 characters in the snapshot.

System_CAPS_pubpropertyLineCount

Gets the number of lines in the snapshot.

System_CAPS_pubpropertyLines

Gets an enumerator for the set of lines in the snapshot.

System_CAPS_pubpropertyTextBuffer

The ITextBuffer of which this is a snapshot.

System_CAPS_pubpropertyVersion

The version of the ITextBuffer that this ITextSnapshot represents.

NameDescription
System_CAPS_pubmethodCopyTo(Int32, Char[], Int32, Int32)

Copies a range of text to a character array.

System_CAPS_pubmethodCreateTrackingPoint(Int32, PointTrackingMode)

Creates a ITrackingPoint in this snapshot.

System_CAPS_pubmethodCreateTrackingPoint(Int32, PointTrackingMode, TrackingFidelityMode)

Creates a ITrackingPoint in this snapshot.

System_CAPS_pubmethodCreateTrackingSpan(Int32, Int32, SpanTrackingMode)

Creates a ITrackingSpan in this snapshot.

System_CAPS_pubmethodCreateTrackingSpan(Int32, Int32, SpanTrackingMode, TrackingFidelityMode)

Creates a ITrackingSpan in this snapshot.

System_CAPS_pubmethodCreateTrackingSpan(Span, SpanTrackingMode)

Creates a ITrackingSpan in this snapshot.

System_CAPS_pubmethodCreateTrackingSpan(Span, SpanTrackingMode, TrackingFidelityMode)

Creates a ITrackingSpan in this snapshot.

System_CAPS_pubmethodGetLineFromLineNumber(Int32)

Gets an ITextSnapshotLine for the given line number.

System_CAPS_pubmethodGetLineFromPosition(Int32)

Gets an ITextSnapshotLine for a line at the given position.

System_CAPS_pubmethodGetLineNumberFromPosition(Int32)

Gets the number of the line that contains the character at the specified position.

System_CAPS_pubmethodGetText()

Gets all the text in the snapshot.

System_CAPS_pubmethodGetText(Int32, Int32)

Gets text from the snapshot starting at startIndex and having a length equal to length.

System_CAPS_pubmethodGetText(Span)

Gets text from the snapshot starting at the beginning of the span and having a length equal to the length of the span.

System_CAPS_pubmethodToCharArray(Int32, Int32)

Converts a range of text to a character array.

System_CAPS_pubmethodWrite(TextWriter)

Writes the contents of the snapshot.

System_CAPS_pubmethodWrite(TextWriter, Span)

Writes a substring of the contents of the snapshot.

For more information about text snapshots, see "A Closer Look at the Text Model and the Text View" in Inside the Editor.

The first character in the sequence has index zero.

Return to top
Show: