Partager via


Source.GetTokenInfo Method

Gets information about the token at the specified position.

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.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)

Syntax

'Déclaration
Public Overridable Function GetTokenInfo ( _
    line As Integer, _
    col As Integer _
) As TokenInfo
'Utilisation
Dim instance As Source
Dim line As Integer
Dim col As Integer
Dim returnValue As TokenInfo

returnValue = instance.GetTokenInfo(line, _
    col)
public virtual TokenInfo GetTokenInfo(
    int line,
    int col
)
public:
virtual TokenInfo^ GetTokenInfo(
    int line, 
    int col
)
abstract GetTokenInfo : 
        line:int * 
        col:int -> TokenInfo 
override GetTokenInfo : 
        line:int * 
        col:int -> TokenInfo 
public function GetTokenInfo(
    line : int, 
    col : int
) : TokenInfo

Parameters

  • line
    Type: System.Int32
    The number of the line containing the token to examine.
  • col
    Type: System.Int32
    The character offset in the line to the token to examine.

Return Value

Type: Microsoft.VisualStudio.Package.TokenInfo
A TokenInfo object containing information about the current token.

Remarks

This method calls the colorizer's GetLineInfo method to tokenize the current line, and then calls

GetTokenInfoto get the token information at the character position on the line.

Avertissement

This method requires a valid Colorizer object and associated IScanner object to be passed to the Source class constructor.

.NET Framework Security

See Also

Reference

Source Class

Source Members

Microsoft.VisualStudio.Package Namespace