Colorizer.GetColorInfo Method
Returns the parsing state at the end of the line without returning any colorization information.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
'宣言
Public Overridable Function GetColorInfo ( _
line As String, _
length As Integer, _
state As Integer _
) As Integer
'使用
Dim instance As Colorizer
Dim line As String
Dim length As Integer
Dim state As Integer
Dim returnValue As Integer
returnValue = instance.GetColorInfo(line, _
length, state)
public virtual int GetColorInfo(
string line,
int length,
int state
)
public:
virtual int GetColorInfo(
String^ line,
int length,
int state
)
abstract GetColorInfo :
line:string *
length:int *
state:int -> int
override GetColorInfo :
line:string *
length:int *
state:int -> int
public function GetColorInfo(
line : String,
length : int,
state : int
) : int
Parameters
- line
Type: System.String
[in] The text of the line.
- length
Type: System.Int32
[in] The length of the line.
- state
Type: System.Int32
[in] The initial parsing state of the line.
Return Value
Type: System.Int32
Returns the parsing state at the end of the line.
Remarks
This method essentially does what ColorizeLine does but this method does not return any color information, only the parsing state at the end of the line.
The base method calls the scanner's ScanTokenAndProvideInfoAboutIt and caches the result before returning the state. This cached information is used in GetLineInfo.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.