Partilhar via


IAsyncCompletionCommitManager.ShouldCommitCompletion Method

Definition

Overloads

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 typedChar is a commit character at a given location.

If in your language every character returned by PotentialCommitCharacters is a commit character, simply return true.

Called on UI thread.

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.

public:
 bool ShouldCommitCompletion(char typedChar, Microsoft::VisualStudio::Text::SnapshotPoint location, System::Threading::CancellationToken token);
public bool ShouldCommitCompletion (char typedChar, Microsoft.VisualStudio.Text.SnapshotPoint location, System.Threading.CancellationToken token);
abstract member ShouldCommitCompletion : char * Microsoft.VisualStudio.Text.SnapshotPoint * System.Threading.CancellationToken -> bool
Public Function ShouldCommitCompletion (typedChar As Char, location As SnapshotPoint, token As CancellationToken) As Boolean

Parameters

typedChar
Char

Character typed by the user

location
SnapshotPoint

Location in the snapshot of the view's topmost buffer. The character is not inserted into this snapshot.

token
CancellationToken

Token used to cancel this operation

Returns

True if this character should commit the active session.

Applies to

ShouldCommitCompletion(IAsyncCompletionSession, SnapshotPoint, Char, CancellationToken)

Returns whether typedChar is a commit character at a given location.

If in your language every character returned by PotentialCommitCharacters is a commit character, simply return true.

Called on UI thread.

public:
 bool ShouldCommitCompletion(Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::IAsyncCompletionSession ^ session, Microsoft::VisualStudio::Text::SnapshotPoint location, char typedChar, System::Threading::CancellationToken token);
public bool ShouldCommitCompletion (Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSession session, Microsoft.VisualStudio.Text.SnapshotPoint location, char typedChar, System.Threading.CancellationToken token);
abstract member ShouldCommitCompletion : Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSession * Microsoft.VisualStudio.Text.SnapshotPoint * char * System.Threading.CancellationToken -> bool
Public Function ShouldCommitCompletion (session As IAsyncCompletionSession, location As SnapshotPoint, typedChar As Char, token As CancellationToken) As Boolean

Parameters

location
SnapshotPoint

Location in the snapshot of the view's topmost buffer. The character is not inserted into this snapshot

typedChar
Char

Character typed by the user

token
CancellationToken

Token used to cancel this operation

Returns

True if this character should commit the active session

Applies to