IAsyncCompletionCommitManagerProvider 接口

定义

提供的实例 IAsyncCompletionCommitManager ,它提供了调整提交行为的方法,包括提交的类型化字符以及提交的 IAsyncCompletionSession 方式 CompletionItem

public interface class IAsyncCompletionCommitManagerProvider
public interface IAsyncCompletionCommitManagerProvider
type IAsyncCompletionCommitManagerProvider = interface
Public Interface IAsyncCompletionCommitManagerProvider

示例

[Export(typeof(IAsyncCompletionCommitManagerProvider))]
[Name(nameof(MyCompletionCommitManagerProvider))]
[ContentType("text")]
[TextViewRoles(PredefinedTextViewRoles.Editable)]
[Order(Before = "OtherCompletionCommitManager")]
public class MyCompletionCommitManagerProvider : IAsyncCompletionCommitManagerProvider

注解

这是一个 MEF 组件,应使用 [ContentType] 和 [Name] 属性和可选的 [Order] 和 [TextViewRoles] 属性进行导出。 IAsyncCompletionItemManager首先选择一个实例,方法是将 ContentType 与内容类型进行匹配 TextBuffer ,然后按顺序匹配。 IAsyncCompletionItemManager在给定视图中只使用一个。

方法

GetOrCreate(ITextView)

为指定的创建的一个实例 IAsyncCompletionCommitManager ITextView 。 在 UI 线程上调用。

适用于