确定代码重新设置当前是否允许的。
命名空间: Microsoft.VisualStudio.TextManager.Interop
程序集: Microsoft.VisualStudio.TextManager.Interop.8.0(在 Microsoft.VisualStudio.TextManager.Interop.8.0.dll 中)
语法
声明
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
参数
pfCanReformat
类型:Int32%[out] 返回非零 (TRUE),如果代码可以重新设置;否则,返回零 (0)FALSE)。
返回值
类型:Int32
如果成功,则返回; S_OK否则,返回错误代码。
备注
COM 签名
从 singlefileeditor.idl:
HRESULT CanReformatCode(
[out] BOOL* pfCanReformat
);
此方法用于代码语言可能需要重新设置代码中处理的情况,但编辑器正忙在可能会干扰重新设置格式的其他任务。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。