Поделиться через


Declarations.IsCommitChar Method

Determines whether the specified character can be used to complete the specified text.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)

Syntax

'Декларация
Public Overridable Function IsCommitChar ( _
    textSoFar As String, _
    selected As Integer, _
    commitCharacter As Char _
) As Boolean
public virtual bool IsCommitChar(
    string textSoFar,
    int selected,
    char commitCharacter
)

Parameters

  • textSoFar
    Type: System.String
    [in] A string containing the text typed by the user.
  • selected
    Type: System.Int32
    [in] The number of characters that are currently selected or -1 if nothing is selected.
  • commitCharacter
    Type: System.Char
    [in] The character to determine is a completion character.

Return Value

Type: System.Boolean
If the character is a commit character, returns true; otherwise, returns false.

Remarks

Typing a commit character causes the currently selected item in the completion list to be committed to the source file (through a call to the OnCommit method). This method determines if the character typed can be used to commit the text to the source file.

Text might be selected (for example, because of a previous auto-completion step) and that could change what is considered a commit character.

The base method returns true if the commit character is not a letter, numerical digit, or an underscore.

.NET Framework Security

See Also

Reference

Declarations Class

Microsoft.VisualStudio.Package Namespace