Share via


IVsContainedLanguageHost.CanReformatCode Method

Determines if code reformatting is currently allowed.

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

Syntax

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

Parameters

  • pfCanReformat
    Type: System.Int32%

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

Return Value

Type: System.Int32
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.

.NET Framework Security

See Also

Reference

IVsContainedLanguageHost Interface

Microsoft.VisualStudio.TextManager.Interop Namespace