IVsHierarchyItemManager.TryGetHierarchyItem Method

Definition

Gets a cached IVsHierarchyItem representing the specified hierarchy and item identifier, if one has already been created.

public:
 bool TryGetHierarchyItem(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ hierarchy, System::UInt32 itemid, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::IVsHierarchyItem ^ % item);
public bool TryGetHierarchyItem (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy hierarchy, uint itemid, out Microsoft.VisualStudio.Shell.IVsHierarchyItem item);
abstract member TryGetHierarchyItem : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * IVsHierarchyItem -> bool
Public Function TryGetHierarchyItem (hierarchy As IVsHierarchy, itemid As UInteger, ByRef item As IVsHierarchyItem) As Boolean

Parameters

hierarchy
IVsHierarchy

The hierarchy from which to retrieve the hierarchy item.

itemid
UInt32

The item identifier.

item
IVsHierarchyItem

Returns the hierarchy item.

Returns

true if the IVsHierarchyItem exists and was returned, otherwise false.

Remarks

The returned IVsHierarchyItem can be used to get properties about the item and to visit its parent and child items.

Applies to