共用方式為


IVsColorizer.GetStateMaintenanceFlag(Int32) Method

Definition

Returns the state maintenance requirement for the colorizer.

public:
 int GetStateMaintenanceFlag([Runtime::InteropServices::Out] int % pfFlag);
int GetStateMaintenanceFlag([Runtime::InteropServices::Out] int & pfFlag);
public int GetStateMaintenanceFlag (out int pfFlag);
abstract member GetStateMaintenanceFlag : int -> int
Public Function GetStateMaintenanceFlag (ByRef pfFlag As Integer) As Integer

Parameters

pfFlag
Int32

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

Returns

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).

Applies to