Source.ColorState Property

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

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

Syntax

'Declaration
Public Property ColorState As IVsTextColorState
public IVsTextColorState ColorState { get; set; }
public:
property IVsTextColorState^ ColorState {
    IVsTextColorState^ get ();
    void set (IVsTextColorState^ value);
}
member ColorState : IVsTextColorState with get, set
function get ColorState () : IVsTextColorState 
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.

Note

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.

.NET Framework Security

See Also

Reference

Source Class

Microsoft.VisualStudio.Package Namespace