ITrackingSpan.GetText Method (ITextSnapshot)

 

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

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

string GetText(
	ITextSnapshot snapshot
)

Parameters

snapshot
Type: Microsoft.VisualStudio.Text.ITextSnapshot

The snapshot to which to map the tracking span.

Return Value

Type: System.String

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

Exception Condition
ArgumentNullException

snapshot is null.

ArgumentException

snapshot is not a snapshot of TextBuffer.

Return to top
Show: