IProjectionSnapshot::MapToSourceSnapshots Method (Int32)

 

Maps a position in the projection snapshot to the corresponding position in one or more source snapshots.

Namespace:   Microsoft.VisualStudio.Text.Projection
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

ReadOnlyCollection<SnapshotPoint>^ MapToSourceSnapshots(
	int position
)

Parameters

position
Type: System::Int32

The position in the projection snapshot.

Return Value

Type: System.Collections.ObjectModel::ReadOnlyCollection<SnapshotPoint>^

A read-only collection of snapshot points to which the position maps. This collection contains one snapshot point unless the position lies on a source span seam, in which case it can contain two or more points.

Exception Condition
ArgumentOutOfRangeException

position is less than zero or greater than or equal to the length of the snapshot.

In general, a source span seam occurs at the end of a source span of nonzero length and the beginning of a source span of nonzero length, and coincides with zero or more source spans of zero length. Every span on a seam has a point in the result collection.

Return to top
Show: