IAsyncCompletionCommitManagerProvider 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供的实例 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 线程上调用。 |