共用方式為


IAsyncCompletionCommitManagerProvider Interface

Definition

Provides instances of IAsyncCompletionCommitManager or IAsyncCompletionCommitManager2 which provides means to adjust the commit behavior, including which typed characters commit the IAsyncCompletionSession and how to commit CompletionItems.

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

Examples

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

Remarks

This is a MEF component and should be exported with [ContentType] and [Name] attributes and optional [Order] and [TextViewRoles] attributes. An instance of IAsyncCompletionCommitManager is selected first by matching ContentType with content type of the TextBuffer, and then by Order. Instances of IAsyncCompletionCommitManager2 are queried before instances of IAsyncCompletionCommitManager.

Methods

GetOrCreate(ITextView)

Creates an instance of IAsyncCompletionCommitManager or IAsyncCompletionCommitManager2 for the specified ITextView. Called on the UI thread.

Applies to