Freigeben über


ITrackingSpan.GetSpan Method (ITextSnapshot)

Maps the tracking span to the specified snapshot of its text buffer.

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

Syntax

'Declaration
Function GetSpan ( _
    snapshot As ITextSnapshot _
) As SnapshotSpan
SnapshotSpan GetSpan(
    ITextSnapshot snapshot
)
SnapshotSpan GetSpan(
    ITextSnapshot^ snapshot
)
abstract GetSpan : 
        snapshot:ITextSnapshot -> SnapshotSpan
function GetSpan(
    snapshot : ITextSnapshot
) : SnapshotSpan

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.SnapshotSpan
The SnapshotSpan.

Exceptions

Exception Condition
ArgumentNullException

snapshot is nulla null reference (Nothing in Visual Basic).

ArgumentException

snapshot is not a snapshot of TextBuffer.

.NET Framework Security

See Also

Reference

ITrackingSpan Interface

GetSpan Overload

Microsoft.VisualStudio.Text Namespace