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
'宣告
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
- targetBuffer
Type: Microsoft.VisualStudio.Text.ITextBuffer
The ITextBuffer to which to map the span.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.