Share via


Colorizer.GetStateMaintenanceFlag Method

Called to determine if the colorizer requires per line state management.

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.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.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)

Syntax

'Declaration
Public Overridable Function GetStateMaintenanceFlag ( _
    <OutAttribute> ByRef flag As Integer _
) As Integer
public virtual int GetStateMaintenanceFlag(
    out int flag
)
public:
virtual int GetStateMaintenanceFlag(
    [OutAttribute] int% flag
)
abstract GetStateMaintenanceFlag : 
        flag:int byref -> int  
override GetStateMaintenanceFlag : 
        flag:int byref -> int
public function GetStateMaintenanceFlag(
    flag : int
) : int

Parameters

  • flag
    Type: Int32%

    [out] Returns nonzero if the colorizer requires parsing state to be tracked per line; otherwise, returns zero.

Return Value

Type: Int32
If successful, returns S_OK; otherwise, returns an error code.

Implements

IVsColorizer.GetStateMaintenanceFlag(Int32%)

Remarks

This method is used to determine if the colorizer requires managing the parsing state for each line of source. If the colorizer does require managing line by line state, the editing performance may suffer. Note that the managed package framework version of Colorizer assumes a line-by-line state.

This method is an implementation of GetStateMaintenanceFlag.

The base method returns a 1 if the suspended state is 0; otherwise, it returns a 0.

The colorizer can be suspended by a call to Suspend and resumed by a call to Resume. This method indicates the current suspension state. The colorizer is suspended while handling code snippet expansion (colorization is unnecessary until the expansion is completed). Note that the base class does not pay attention to this flag although it is maintained.

.NET Framework Security

See Also

Reference

Colorizer Class

Microsoft.VisualStudio.Package Namespace