Compartir a través de


IVsColorizer.GetStateMaintenanceFlag Method

Returns the state maintenance requirement for the colorizer.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'Declaration
Function GetStateMaintenanceFlag ( _
    <OutAttribute> ByRef pfFlag As Integer _
) As Integer
int GetStateMaintenanceFlag(
    out int pfFlag
)
int GetStateMaintenanceFlag(
    [OutAttribute] int% pfFlag
)
abstract GetStateMaintenanceFlag : 
        pfFlag:int byref -> int
function GetStateMaintenanceFlag(
    pfFlag : int
) : int

Parameters

  • pfFlag
    Type: System.Int32%

    [out] true if this colorizer requires per-line state maintenance, otherwise it should be set to false.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsColorizer::GetStateMaintenanceFlag(
   [out] BOOL *pfFlag
);

If the colorizer requires per-line state maintenance, then the implementation of this method should set the pfFlag parameter to true, otherwise it should be set to false. If state maintenance is not required, editing performance is improved. A value of false implies the colorizer either maintains state internally for each line or the particular language does not allow tokens to span more than one line (for example, block comments are treated as a single token and can span more than one line, requiring some sort of state maintenance as each line is processed by the colorizer).

.NET Framework Security

See Also

Reference

IVsColorizer Interface

Microsoft.VisualStudio.TextManager.Interop Namespace