IMappingPoint.GetInsertionPoint(Predicate<ITextBuffer>) 方法

定义

将点映射到匹配中的插入点 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)

参数

match
Predicate<ITextBuffer>

用于匹配的谓词 ITextBuffer

返回

Nullable<SnapshotPoint>

SnapshotPoint匹配缓冲区中的,如果该点未出现在该缓冲区中,则为 null。

例外

match 为 null。

注解

在通常情况下,这是一个简单的计算,它将映射到使用调用方批准的投影缓冲区 match 。 如果投影映射中存在多义性,则 GetTypicalInsertionPosition(SnapshotPoint, ReadOnlyCollection<SnapshotPoint>) 会咨询相关投影缓冲区的方法。 match 在遇到匹配项之前,将在缓冲区图形中将作为文本缓冲区调用。 这会选择所需的缓冲区,将不会再次调用该谓词。 如果在遇到的任何缓冲区中都找不到匹配项,则结果将为 null。

适用于