IProjectionSnapshot.MapFromSourceSnapshot Method (SnapshotSpan)
Maps a snapshot span of a source buffer to a list of spans of the projection snapshot.
Namespace: Microsoft.VisualStudio.Text.Projection
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
‘선언
Function MapFromSourceSnapshot ( _
span As SnapshotSpan _
) As ReadOnlyCollection(Of Span)
ReadOnlyCollection<Span> MapFromSourceSnapshot(
SnapshotSpan span
)
ReadOnlyCollection<Span>^ MapFromSourceSnapshot(
SnapshotSpan span
)
abstract MapFromSourceSnapshot :
span:SnapshotSpan -> ReadOnlyCollection<Span>
function MapFromSourceSnapshot(
span : SnapshotSpan
) : ReadOnlyCollection<Span>
Parameters
- span
Type: Microsoft.VisualStudio.Text.SnapshotSpan
The snapshot span in a source buffer to map.
Return Value
Type: System.Collections.ObjectModel.ReadOnlyCollection<Span>
A non-nulla null reference (Nothing in Visual Basic) list of spans. The list will be empty if none of the positions in span are projected by a source span of the projection snapshot.
Exceptions
Exception | Condition |
---|---|
ArgumentException | span does not belong to a source buffer of this projection buffer. |
Remarks
The resulting ordered list may be empty, contain a single element, or contain multiple elements.
.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.