Gets the hierarchy node specified by the project GUID.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Syntax
'宣言
Public Shared Function GetHierarchy ( _
site As IServiceProvider, _
projectGuid As Guid _
) As IVsHierarchy
'使用
Dim site As IServiceProvider
Dim projectGuid As Guid
Dim returnValue As IVsHierarchy
returnValue = VsShellUtilities.GetHierarchy(site, _
projectGuid)
public static IVsHierarchy GetHierarchy(
IServiceProvider site,
Guid projectGuid
)
public:
static IVsHierarchy^ GetHierarchy(
IServiceProvider^ site,
Guid projectGuid
)
public static function GetHierarchy(
site : IServiceProvider,
projectGuid : Guid
) : IVsHierarchy
Parameters
site
Type: System.IServiceProvider
projectGuid
Type: System.GuidThe GUID of the project.
Return Value
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy
The IVsHierarchy interface of the project.
Remarks
If the project is not open, this method will catch and trace an InvalidCastException.
Permissions
- 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.