IVsHierarchyItemCollectionProvider.GetDescendantsAsync Method

Definition

Asynchronously gets a flat list of hierarchy items that exist within the specified hierarchy.

public:
 System::Threading::Tasks::Task<Microsoft::VisualStudio::Shell::IReadOnlyObservableSet<Microsoft::VisualStudio::Shell::IVsHierarchyItem ^> ^> ^ GetDescendantsAsync(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ hierarchy, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Shell.IReadOnlyObservableSet<Microsoft.VisualStudio.Shell.IVsHierarchyItem>> GetDescendantsAsync (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy hierarchy, System.Threading.CancellationToken cancellationToken);
abstract member GetDescendantsAsync : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Shell.IReadOnlyObservableSet<Microsoft.VisualStudio.Shell.IVsHierarchyItem>>
Public Function GetDescendantsAsync (hierarchy As IVsHierarchy, cancellationToken As CancellationToken) As Task(Of IReadOnlyObservableSet(Of IVsHierarchyItem))

Parameters

hierarchy
IVsHierarchy

The hierarchy from which the descendant hierarchy items are aggregated.

cancellationToken
CancellationToken

A cancellation token that can be used to cancel the asynchronous request.

Returns

A task that, when complete, provides the flattened set of hierarchy items.

Remarks

The set returned is kept up to date as the hierarchy changes.

Applies to