IAsyncCompletionCommitManager Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a class that provides means to adjust the commit behavior, including which typed characters commit the IAsyncCompletionSession and how to commit CompletionItems.
public interface class IAsyncCompletionCommitManager
public interface IAsyncCompletionCommitManager
type IAsyncCompletionCommitManager = interface
Public Interface IAsyncCompletionCommitManager
- Derived
Remarks
Instances of this class should be created by IAsyncCompletionCommitManagerProvider, which is a MEF part.
Properties
PotentialCommitCharacters |
Returns characters that may commit completion. When completion is active and a text edit matches one of these characters, ShouldCommitCompletion(IAsyncCompletionSession, SnapshotPoint, Char, CancellationToken) is called to verify that the character is indeed a commit character at a given location. Called on UI thread. If the commit charactersr are not known or are variable, consider using IAsyncCompletionCommitManager2 which ignores the PotentialCommitCharacters optimization and supports handling each character individually. |
Methods
ShouldCommitCompletion(Char, SnapshotPoint, CancellationToken) |
Returns whether this character is a commit character in a given location. If every character returned by PotentialCommitCharacters should always commit the active completion session, return true. Called on UI thread. |
ShouldCommitCompletion(IAsyncCompletionSession, SnapshotPoint, Char, CancellationToken) |
Returns whether
If in your language every character returned by PotentialCommitCharacters
is a commit character, simply return Called on UI thread. |
TryCommit(IAsyncCompletionSession, ITextBuffer, CompletionItem, Char, CancellationToken) |
Allows the implementer of IAsyncCompletionCommitManager to customize how specified CompletionItem is committed.
This method is called on UI thread, before the In most cases, implementer does not need to commit the item. Return Unhandled to allow another IAsyncCompletionCommitManager to attempt the commit, or to invoke the default commit behavior.
To perform a custom commit, replace contents of
Called on UI thread. |
TryCommit(ITextView, ITextBuffer, CompletionItem, ITrackingSpan, Char, CancellationToken) |
Allows the instance of IAsyncCompletionCommitManager to commit of specified CompletionItem. Implementer does not need to commit the item. Return Unhandled to allow another IAsyncCompletionCommitManager to attempt the commit, or to invoke default commit behavior. Called on UI thread. |