Share via


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

'Declaration
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

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

See Also

Reference

IProjectionSnapshot Interface

MapFromSourceSnapshot Overload

Microsoft.VisualStudio.Text.Projection Namespace