Compartir a través de


VsShellUtilities.GetProject Method

Returns a project for the specified document.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)

Syntax

'Declaración
Public Shared Function GetProject ( _
    site As IServiceProvider, _
    moniker As String _
) As IVsHierarchy
public static IVsHierarchy GetProject(
    IServiceProvider site,
    string moniker
)

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

Microsoft.VisualStudio.Shell Namespace