Udostępnij za pośrednictwem


IVsContainedLanguageHost.CanReformatCode(Int32) Method

Definition

Determines if code reformatting is currently allowed.

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

Parameters

pfCanReformat
Int32

[out] Returns nonzero (TRUE) if the code can be reformatted; otherwise, returns zero (FALSE).

Returns

If successful, returns S_OK; otherwise, returns an error code.

Remarks

COM Signature

From singlefileeditor.idl:

HRESULT CanReformatCode(  
   [out] BOOL* pfCanReformat  
);  

This method is used to handle situations where the code language may want to reformat the code but the editor is still busy on other tasks that could interfere with the reformatting.

Applies to