Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TokenInfo Class

Provides information about a particular token encountered by a language service's language parser.

System.Object
  Microsoft.VisualStudio.Package.TokenInfo

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

public class TokenInfo

The TokenInfo type exposes the following members.

  NameDescription
Public methodTokenInfo()Initializes a new instance of the TokenInfo class to the default values.
Public methodTokenInfo(Int32, Int32, TokenType)Initializes a new instance of the TokenInfo class to the specified values.
Top

  NameDescription
Public propertyColorDetermines the color index to use for the token.
Public propertyEndIndexDetermines the index of the last character of the token.
Public propertyStartIndexDetermines the index of the first character of the token.
Public propertyTokenDetermines the token ID as represented by the TokenInfo object.
Public propertyTriggerDetermines the various triggers that can be set for the token.
Public propertyTypeDetermines the type of the token.
Top

  NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The IScanner scanner uses this class to provide information about each token parsed. This class identifies the token type, specifies a color index for the token, specifies the start and end characters of the token (relative to the current line being parsed), and specifies any triggers that can be handled based on the token's type. See each property of this class for more details on how and when these properties are used.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft