Partager via


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)

Syntax

'Declaration
Function MapToSourceSnapshots ( _
    position As Integer _
) As ReadOnlyCollection(Of SnapshotPoint)
ReadOnlyCollection<SnapshotPoint> MapToSourceSnapshots(
    int position
)
ReadOnlyCollection<SnapshotPoint>^ MapToSourceSnapshots(
    int position
)
abstract MapToSourceSnapshots : 
        position:int -> ReadOnlyCollection<SnapshotPoint> 
function MapToSourceSnapshots(
    position : int
) : ReadOnlyCollection<SnapshotPoint>

Parameters

  • position
    Type: Int32

    The position in the projection snapshot.

Return Value

Type: 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.

Exceptions

Exception Condition
ArgumentOutOfRangeException

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

Remarks

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.

.NET Framework Security

See Also

Reference

IProjectionSnapshot Interface

MapToSourceSnapshots Overload

Microsoft.VisualStudio.Text.Projection Namespace