Source.ColorState Property

Gets or sets the IVsTextColorState object that is used in various parsing tasks.

Namespace:  Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)

Syntax

'宣言
Public Property ColorState As IVsTextColorState
'使用
Dim instance As Source
Dim value As IVsTextColorState

value = instance.ColorState

instance.ColorState = value
public IVsTextColorState ColorState { get; set; }
public:
property IVsTextColorState^ ColorState {
    IVsTextColorState^ get ();
    void set (IVsTextColorState^ value);
}
public function get ColorState () : IVsTextColorState
public function set ColorState (value : IVsTextColorState)

Property Value

Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextColorState

The IVsTextColorState interface that is obtained from the IVsTextLines object passed to the constructor.

Remarks

The IVsTextColorState interface is used by the colorizer to remember the parse state at the end of every line. This allows parsing to continue from any line in the source.

注意

The colorizer parser is used not only for syntax highlighting but for retrieving information about tokens on a line. This is typically done through a call to the GetLineInfo method to tokenize the line; then the tokens are accessed one by one.

Permissions

See Also

Reference

Source Class

Source Members

Microsoft.VisualStudio.Package Namespace