Share via


IVsHierarchyItemManager.TryGetHierarchyItemIdentity Method

Definition

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

public:
 bool TryGetHierarchyItemIdentity(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ hierarchy, System::UInt32 itemid, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::IVsHierarchyItemIdentity ^ % identity);
public:
 bool TryGetHierarchyItemIdentity(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ hierarchy, unsigned int itemid, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::IVsHierarchyItemIdentity ^ &  identity);
bool TryGetHierarchyItemIdentity(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & hierarchy, unsigned int itemid, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::IVsHierarchyItemIdentity const & & identity);
public bool TryGetHierarchyItemIdentity (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy hierarchy, uint itemid, out Microsoft.VisualStudio.Shell.IVsHierarchyItemIdentity identity);
abstract member TryGetHierarchyItemIdentity : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * IVsHierarchyItemIdentity -> bool
Public Function TryGetHierarchyItemIdentity (hierarchy As IVsHierarchy, itemid As UInteger, ByRef identity As IVsHierarchyItemIdentity) As Boolean

Parameters

hierarchy
IVsHierarchy

The hierarchy from which to retrieve the hierarchy item identity.

itemid
UInt32

The item identifier.

identity
IVsHierarchyItemIdentity

Returns the hierarchy item identity.

Returns

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

Remarks

The returned IVsHierarchyItemIdentity provides information about related nested hierarchies. This method only returns an identity if the corresponding identity has previously been created by GetHierarchyItem.

Applies to