다음을 통해 공유


VsShellUtilities.IsDocumentOpen Method

Determines whether the specified document is open.

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)

Syntax

‘선언
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
‘사용 방법
Dim provider As IServiceProvider
Dim fullPath As String
Dim logicalView As Guid
Dim hierarchy As IVsUIHierarchy
Dim itemID As UInteger
Dim windowFrame As IVsWindowFrame
Dim returnValue As Boolean

returnValue = VsShellUtilities.IsDocumentOpen(provider, _
    fullPath, logicalView, hierarchy, _
    itemID, windowFrame)
public static bool IsDocumentOpen(
    IServiceProvider provider,
    string fullPath,
    Guid logicalView,
    out IVsUIHierarchy hierarchy,
    out uint itemID,
    out IVsWindowFrame windowFrame
)
public:
static bool IsDocumentOpen(
    IServiceProvider^ provider, 
    String^ fullPath, 
    Guid logicalView, 
    [OutAttribute] IVsUIHierarchy^% hierarchy, 
    [OutAttribute] unsigned int% itemID, 
    [OutAttribute] IVsWindowFrame^% windowFrame
)
static member IsDocumentOpen : 
        provider:IServiceProvider * 
        fullPath:string * 
        logicalView:Guid * 
        hierarchy:IVsUIHierarchy byref * 
        itemID:uint32 byref * 
        windowFrame:IVsWindowFrame byref -> bool 
public static function IsDocumentOpen(
    provider : IServiceProvider, 
    fullPath : String, 
    logicalView : Guid, 
    hierarchy : IVsUIHierarchy, 
    itemID : uint, 
    windowFrame : IVsWindowFrame
) : boolean

Parameters

  • logicalView
    Type: System.Guid
    The GUID of the logical view.
  • itemID
    Type: System.UInt32%
    [out] Returns the item ID of the document.

Return Value

Type: System.Boolean
true if the document is open in the given logical view. If logicalView is Guid.Empty, then this method returns true if any view is open; otherwise, false.

.NET Framework Security

See Also

Reference

VsShellUtilities Class

VsShellUtilities Members

Microsoft.VisualStudio.Shell Namespace