IMappingSpan.GetSpans Method (ITextBuffer)

Maps the span to a particular ITextBuffer.

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

Syntax

'Declaration
Function GetSpans ( _
    targetBuffer As ITextBuffer _
) As NormalizedSnapshotSpanCollection
NormalizedSnapshotSpanCollection GetSpans(
    ITextBuffer targetBuffer
)
NormalizedSnapshotSpanCollection^ GetSpans(
    ITextBuffer^ targetBuffer
)
abstract GetSpans : 
        targetBuffer:ITextBuffer -> NormalizedSnapshotSpanCollection
function GetSpans(
    targetBuffer : ITextBuffer
) : NormalizedSnapshotSpanCollection

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection
The possibly empty collection of spans in the targetBuffer to which the span maps.

Exceptions

Exception Condition
ArgumentNullException

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

.NET Framework Security

See Also

Reference

IMappingSpan Interface

GetSpans Overload

Microsoft.VisualStudio.Text Namespace