IMappingPoint::GetInsertionPoint Method (Predicate<ITextBuffer^>^)

 

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)

Nullable<SnapshotPoint> GetInsertionPoint(
	Predicate<ITextBuffer^>^ match
)

Parameters

match
Type: System::Predicate<ITextBuffer^>^

The predicate used to match the ITextBuffer.

Return Value

Type: System::Nullable<SnapshotPoint>

A SnapshotPoint in the matching buffer, or null if the point does not appear in that buffer.

Exception Condition
ArgumentNullException

match is null.

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 null.

Return to top
Show: