다음을 통해 공유


VsShellUtilities.GetProject Method

Returns a project for the specified document.

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 GetProject ( _
    site As IServiceProvider, _
    moniker As String _
) As IVsHierarchy
‘사용 방법
Dim site As IServiceProvider
Dim moniker As String
Dim returnValue As IVsHierarchy

returnValue = VsShellUtilities.GetProject(site, _
    moniker)
public static IVsHierarchy GetProject(
    IServiceProvider site,
    string moniker
)
public:
static IVsHierarchy^ GetProject(
    IServiceProvider^ site, 
    String^ moniker
)
static member GetProject : 
        site:IServiceProvider * 
        moniker:string -> IVsHierarchy 
public static function GetProject(
    site : IServiceProvider, 
    moniker : String
) : IVsHierarchy

Parameters

  • moniker
    Type: System.String
    The unique identifier of the document in the project system.

Return Value

Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy
The IVsHierarchy interface of the project that contains the document.

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.

.NET Framework Security

See Also

Reference

VsShellUtilities Class

VsShellUtilities Members

Microsoft.VisualStudio.Shell Namespace