IMappingPoint.GetInsertionPoint Method

Maps the point to an insertion point in a matching ITextBuffer.

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

Syntax

'Declaration
Function GetInsertionPoint ( _
    match As Predicate(Of ITextBuffer) _
) As Nullable(Of SnapshotPoint)
Nullable<SnapshotPoint> GetInsertionPoint(
    Predicate<ITextBuffer> match
)
Nullable<SnapshotPoint> GetInsertionPoint(
    Predicate<ITextBuffer^>^ match
)
abstract GetInsertionPoint : 
        match:Predicate<ITextBuffer> -> Nullable<SnapshotPoint> 
function GetInsertionPoint(
    match : Predicate<ITextBuffer>
) : Nullable<SnapshotPoint>

Parameters

Return Value

Type: System.Nullable<SnapshotPoint>
A SnapshotPoint in the matching buffer, or nulla null reference (Nothing in Visual Basic) if the point does not appear in that buffer.

Exceptions

Exception Condition
ArgumentNullException

match is nulla null reference (Nothing in Visual Basic).

Remarks

In the usual case, this computation maps through projection buffers, subject to caller approval using match. If there is ambiguity in a projection mapping, it is resolved by calling GetTypicalInsertionPosition.

match is called for each text buffer in the buffer graph until a match is found. This selects the buffer of interest, and the predicate will not be called again. If no match is found, the result is nulla null reference (Nothing in Visual Basic).

.NET Framework Security

See Also

Reference

IMappingPoint Interface

Microsoft.VisualStudio.Text Namespace