다음을 통해 공유


VsShellUtilities.OpenDocument Method

Definition

Overloads

OpenDocument(IServiceProvider, String)

Opens the specified document.

OpenDocument(IServiceProvider, String, Guid, IVsUIHierarchy, UInt32, IVsWindowFrame)

Opens the specified document in the specified view.

OpenDocument(IServiceProvider, String, Guid, IVsUIHierarchy, UInt32, IVsWindowFrame, IVsTextView)

Opens the specified document in the specified logical view.

OpenDocument(IServiceProvider, String)

Opens the specified document.

public:
 static void OpenDocument(IServiceProvider ^ provider, System::String ^ path);
public static void OpenDocument (IServiceProvider provider, string path);
static member OpenDocument : IServiceProvider * string -> unit
Public Shared Sub OpenDocument (provider As IServiceProvider, path As String)
Public Sub OpenDocument (provider As IServiceProvider, path As String)

Parameters

provider
IServiceProvider

The service provider.

path
String

Full path to the document.

Applies to

OpenDocument(IServiceProvider, String, Guid, IVsUIHierarchy, UInt32, IVsWindowFrame)

Opens the specified document in the specified view.

public:
 static void OpenDocument(IServiceProvider ^ provider, System::String ^ fullPath, Guid logicalView, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy ^ % hierarchy, [Runtime::InteropServices::Out] System::UInt32 % itemID, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsWindowFrame ^ % windowFrame);
public static void OpenDocument (IServiceProvider provider, string fullPath, Guid logicalView, out Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy hierarchy, out uint itemID, out Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame windowFrame);
static member OpenDocument : IServiceProvider * string * Guid * IVsUIHierarchy * uint32 * IVsWindowFrame -> unit
Public Shared Sub OpenDocument (provider As IServiceProvider, fullPath As String, logicalView As Guid, ByRef hierarchy As IVsUIHierarchy, ByRef itemID As UInteger, ByRef windowFrame As IVsWindowFrame)
Public Sub OpenDocument (provider As IServiceProvider, fullPath As String, logicalView As Guid, ByRef hierarchy As IVsUIHierarchy, ByRef itemID As UInteger, ByRef windowFrame As IVsWindowFrame)

Parameters

provider
IServiceProvider

The service provider.

fullPath
String

Full path to the document.

logicalView
Guid

GUID identifying the logical view.

hierarchy
IVsUIHierarchy

Reference to the IVsUIHierarchy interface of the project that contains the Open document.

itemID
UInt32

Reference to the hierarchy item identifier of the document in the project.

windowFrame
IVsWindowFrame

A reference to the window frame that is mapped to the document.

Applies to

OpenDocument(IServiceProvider, String, Guid, IVsUIHierarchy, UInt32, IVsWindowFrame, IVsTextView)

Opens the specified document in the specified logical view.

public:
 static void OpenDocument(IServiceProvider ^ provider, System::String ^ fullPath, Guid logicalView, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy ^ % hierarchy, [Runtime::InteropServices::Out] System::UInt32 % itemID, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsWindowFrame ^ % windowFrame, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ % view);
public static void OpenDocument (IServiceProvider provider, string fullPath, Guid logicalView, out Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy hierarchy, out uint itemID, out Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame windowFrame, out Microsoft.VisualStudio.TextManager.Interop.IVsTextView view);
static member OpenDocument : IServiceProvider * string * Guid * IVsUIHierarchy * uint32 * IVsWindowFrame * IVsTextView -> unit
Public Shared Sub OpenDocument (provider As IServiceProvider, fullPath As String, logicalView As Guid, ByRef hierarchy As IVsUIHierarchy, ByRef itemID As UInteger, ByRef windowFrame As IVsWindowFrame, ByRef view As IVsTextView)
Public Sub OpenDocument (provider As IServiceProvider, fullPath As String, logicalView As Guid, ByRef hierarchy As IVsUIHierarchy, ByRef itemID As UInteger, ByRef windowFrame As IVsWindowFrame, ByRef view As IVsTextView)

Parameters

provider
IServiceProvider

The service provider.

fullPath
String

Full path to the document.

logicalView
Guid

In MultiView case determines view to be activated by IVsMultiViewDocumentView. For a list of logical view GUIDS, see constants starting with LOGVIEWID_ defined in NativeMethods class

hierarchy
IVsUIHierarchy

Reference to the IVsUIHierarchy interface of the project that can open the document.

itemID
UInt32

Reference to the hierarchy item identifier of the document in the project.

windowFrame
IVsWindowFrame

A reference to the window frame that is mapped to the document.

view
IVsTextView

A reference to the primary view of the document.

Applies to