Partager via


IProjectionSnapshot.MapToSourceSnapshot Method (Int32)

Maps a position in the projection snapshot to the corresponding position in a source snapshot.

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

Syntax

'Déclaration
Function MapToSourceSnapshot ( _
    position As Integer _
) As SnapshotPoint
SnapshotPoint MapToSourceSnapshot(
    int position
)
SnapshotPoint MapToSourceSnapshot(
    int position
)
abstract MapToSourceSnapshot : 
        position:int -> SnapshotPoint 
function MapToSourceSnapshot(
    position : int
) : SnapshotPoint

Parameters

  • position
    Type: System.Int32
    The position in the projection snapshot.

Return Value

Type: Microsoft.VisualStudio.Text.SnapshotPoint
An SnapshotPoint.

Exceptions

Exception Condition
ArgumentOutOfRangeException

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

Remarks

If the mapping is ambiguous (occurs on a source span seam), see GetTypicalInsertionPosition to choose a source buffer.

.NET Framework Security

See Also

Reference

IProjectionSnapshot Interface

MapToSourceSnapshot Overload

Microsoft.VisualStudio.Text.Projection Namespace