VsShellUtilities.IsDocumentOpen 方法

确定指定的是否文档处于打开状态。

命名空间:  Microsoft.VisualStudio.Shell
程序集:  Microsoft.VisualStudio.Shell.11.0(在 Microsoft.VisualStudio.Shell.11.0.dll 中)

语法

声明
Public Shared Function IsDocumentOpen ( _
    provider As IServiceProvider, _
    fullPath As String, _
    logicalView As Guid, _
    <OutAttribute> ByRef hierarchy As IVsUIHierarchy, _
    <OutAttribute> ByRef itemID As UInteger, _
    <OutAttribute> ByRef windowFrame As IVsWindowFrame _
) As Boolean
public static bool IsDocumentOpen(
    IServiceProvider provider,
    string fullPath,
    Guid logicalView,
    out IVsUIHierarchy hierarchy,
    out uint itemID,
    out IVsWindowFrame windowFrame
)

参数

  • logicalView
    类型:System.Guid
    逻辑视图的 GUID。

返回值

类型:System.Boolean
true ,如果文档已在给定逻辑视图。如果 logicalView 是 Guid.Empty,则此方法返回 true ,如果任何视图中打开的;否则, false。

.NET Framework 安全性

请参见

参考

VsShellUtilities 类

Microsoft.VisualStudio.Shell 命名空间