다음을 통해 공유


TokenInfo Class

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

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Package.TokenInfo

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.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

‘선언
Public Class TokenInfo
public class TokenInfo

The TokenInfo type exposes the following members.

Constructors

  Name Description
Public method TokenInfo() Initializes a new instance of the TokenInfo class to the default values.
Public method TokenInfo(Int32, Int32, TokenType) Initializes a new instance of the TokenInfo class to the specified values.

Top

Properties

  Name Description
Public property Color Determines the color index to use for the token.
Public property EndIndex Determines the index of the last character of the token.
Public property StartIndex Determines the index of the first character of the token.
Public property Token Determines the token ID as represented by the TokenInfo object.
Public property Trigger Determines the various triggers that can be set for the token.
Public property Type Determines the type of the token.

Top

Methods

  Name Description
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

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.

Thread Safety

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

See Also

Reference

Microsoft.VisualStudio.Package Namespace