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)

ReadOnlyCollection<Span>^ MapFromSourceSnapshot(
	SnapshotSpan 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-null 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.

Exception Condition
ArgumentException

span does not belong to a source buffer of this projection buffer.

The resulting ordered list may be empty, contain a single element, or contain multiple elements.

Return to top
Show: