IMappingPoint.GetInsertionPoint(Predicate<ITextBuffer>) Method

Definition

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

public:
 Nullable<Microsoft::VisualStudio::Text::SnapshotPoint> GetInsertionPoint(Predicate<Microsoft::VisualStudio::Text::ITextBuffer ^> ^ match);
public Microsoft.VisualStudio.Text.SnapshotPoint? GetInsertionPoint (Predicate<Microsoft.VisualStudio.Text.ITextBuffer> match);
abstract member GetInsertionPoint : Predicate<Microsoft.VisualStudio.Text.ITextBuffer> -> Nullable<Microsoft.VisualStudio.Text.SnapshotPoint>
Public Function GetInsertionPoint (match As Predicate(Of ITextBuffer)) As Nullable(Of SnapshotPoint)

Parameters

match
Predicate<ITextBuffer>

The predicate used to match the ITextBuffer.

Returns

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

Exceptions

match is null.

Remarks

In the usual case, this is a straightforward computation that maps through projection buffers, subject to caller approval using match. If there is ambiguity in a projection mapping, the GetTypicalInsertionPosition(SnapshotPoint, ReadOnlyCollection<SnapshotPoint>) method for the relevant projection buffer will be consulted. match will be called as text buffers in the buffer graph are encountered, until a match is found. This selects the buffer of interest and the predicate will not be called again. If no match is found with any of encountered buffers, the result will be null.

Applies to