VsShellUtilities.IsDocumentOpen Method
Determines whether the specified document is open.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)
Syntax
'Declaração
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
)
Parameters
- provider
Type: System.IServiceProvider
IServiceProvider .
- fullPath
Type: System.String
The full path to the document.
- logicalView
Type: System.Guid
The GUID of the logical view.
- hierarchy
Type: Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy%
[out] Returns the IVsUIHierarchy interface of the project that contains the document.
- itemID
Type: System.UInt32%
[out] Returns the item ID of the document.
- windowFrame
Type: Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame%
[out] Returns the IVsWindowFrame in which the document is open.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.