IMappingSpan.GetSpans Method (ITextSnapshot)
Maps the span to a particular ITextSnapshot.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Declaration
Function GetSpans ( _
targetSnapshot As ITextSnapshot _
) As NormalizedSnapshotSpanCollection
NormalizedSnapshotSpanCollection GetSpans(
ITextSnapshot targetSnapshot
)
NormalizedSnapshotSpanCollection^ GetSpans(
ITextSnapshot^ targetSnapshot
)
abstract GetSpans :
targetSnapshot:ITextSnapshot -> NormalizedSnapshotSpanCollection
function GetSpans(
targetSnapshot : ITextSnapshot
) : NormalizedSnapshotSpanCollection
Parameters
targetSnapshot
Type: Microsoft.VisualStudio.Text.ITextSnapshotThe ITextSnapshot to which to map the span.
Return Value
Type: Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection
The possibly empty collection of spans in the targetSnapshot to which the span maps.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | targetSnapshot 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.