VsShellUtilities.GetProject(IServiceProvider, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a project for the specified document.
public:
static Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ GetProject(IServiceProvider ^ site, System::String ^ moniker);
public static Microsoft.VisualStudio.Shell.Interop.IVsHierarchy GetProject (IServiceProvider site, string moniker);
static member GetProject : IServiceProvider * string -> Microsoft.VisualStudio.Shell.Interop.IVsHierarchy
Public Shared Function GetProject (site As IServiceProvider, moniker As String) As IVsHierarchy
Public Function GetProject (site As IServiceProvider, moniker As String) As IVsHierarchy
Parameters
- site
- IServiceProvider
The service provider.
- moniker
- String
The document moniker.
Returns
If the document is open, this is a reference to the IVsUIHierarchy Interface implementation of the project that owns the document. If the document is not open, the value of this parameter is NULL.
Remarks
If the document is a file, moniker
can be the file extension rather than the full path to the file (for example, .bmp or .txt). If the document is not a file, moniker
is often a URL.