Udostępnij za pośrednictwem


ITextSnapshot2 Interface

Definition

Provides read access to an immutable snapshot of a ITextBuffer containing a sequence of Unicode characters. The first character in the sequence has index zero.

public interface class ITextSnapshot2 : Microsoft::VisualStudio::Text::ITextSnapshot
public interface ITextSnapshot2 : Microsoft.VisualStudio.Text.ITextSnapshot
type ITextSnapshot2 = interface
    interface ITextSnapshot
Public Interface ITextSnapshot2
Implements ITextSnapshot
Implements

Remarks

Any ITextSnapshot will be upcastable to an ITextSnapshot2.

Properties

ContentType

The IContentType of the TextBuffer when this snapshot was current.

(Inherited from ITextSnapshot)
Item[Int32]

Gets a single character at the specified position.

(Inherited from ITextSnapshot)
Length

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

(Inherited from ITextSnapshot)
LineCount

Gets the positive number of lines in the snapshot. A snapshot whose Length is zero is considered to have one line.

(Inherited from ITextSnapshot)
Lines

An enumerator for the set of lines in the snapshot.

(Inherited from ITextSnapshot)
TextBuffer

The ITextBuffer of which this is a snapshot.

(Inherited from ITextSnapshot)
TextImage

Gets the underlying ITextImage of the snapshot.

Version

The version of the ITextBuffer that this ITextSnapshot represents.

(Inherited from ITextSnapshot)

Methods

CopyTo(Int32, Char[], Int32, Int32)

Copies a range of text to a character array.

(Inherited from ITextSnapshot)
CreateTrackingPoint(Int32, PointTrackingMode, TrackingFidelityMode)

Creates a ITrackingPoint against this snapshot.

(Inherited from ITextSnapshot)
CreateTrackingPoint(Int32, PointTrackingMode)

Creates a ITrackingPoint against this snapshot.

(Inherited from ITextSnapshot)
CreateTrackingSpan(Int32, Int32, SpanTrackingMode, TrackingFidelityMode)

Creates a ITrackingSpan against this snapshot.

(Inherited from ITextSnapshot)
CreateTrackingSpan(Int32, Int32, SpanTrackingMode)

Creates a ITrackingSpan against this snapshot.

(Inherited from ITextSnapshot)
CreateTrackingSpan(Span, SpanTrackingMode, TrackingFidelityMode)

Creates a ITrackingSpan against this snapshot.

(Inherited from ITextSnapshot)
CreateTrackingSpan(Span, SpanTrackingMode)

Creates a ITrackingSpan against this snapshot.

(Inherited from ITextSnapshot)
GetLineFromLineNumber(Int32)

Gets an ITextSnapshotLine for the given line number.

(Inherited from ITextSnapshot)
GetLineFromPosition(Int32)

Gets an ITextSnapshotLine for a line at the given position.

(Inherited from ITextSnapshot)
GetLineNumberFromPosition(Int32)

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

(Inherited from ITextSnapshot)
GetText()

Gets all the text in the snapshot.

(Inherited from ITextSnapshot)
GetText(Int32, Int32)

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

(Inherited from ITextSnapshot)
GetText(Span)

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

(Inherited from ITextSnapshot)
SaveToFile(String, Boolean, Encoding)

Save the entire snapshot to the specified filePath.

ToCharArray(Int32, Int32)

Converts a range of text to a character array.

(Inherited from ITextSnapshot)
Write(TextWriter, Span)

Writes a substring of the contents of the snapshot.

(Inherited from ITextSnapshot)
Write(TextWriter)

Writes the contents of the snapshot.

(Inherited from ITextSnapshot)

Applies to