Share via


ITrackingSpan.GetText(ITextSnapshot) Method

Definition

Maps the tracking span to a particular snapshot of its text buffer and gets the text it designates.

public:
 System::String ^ GetText(Microsoft::VisualStudio::Text::ITextSnapshot ^ snapshot);
public:
 Platform::String ^ GetText(Microsoft::VisualStudio::Text::ITextSnapshot ^ snapshot);
std::wstring GetText(Microsoft::VisualStudio::Text::ITextSnapshot const & snapshot);
public string GetText (Microsoft.VisualStudio.Text.ITextSnapshot snapshot);
abstract member GetText : Microsoft.VisualStudio.Text.ITextSnapshot -> string
Public Function GetText (snapshot As ITextSnapshot) As String

Parameters

snapshot
ITextSnapshot

The snapshot to which to map the tracking span.

Returns

The contents of the tracking span in the specified text snapshot.

Exceptions

snapshot is null.

snapshot is not a snapshot of TextBuffer.

Applies to