Share via


IVsHierarchyItemCollectionProvider.GetFilteredHierarchyItemsAsync Method

Definition

Asynchronously gets a filtered set of hierarchy items from the specified hierarchy item set.

public:
 System::Threading::Tasks::Task<Microsoft::VisualStudio::Shell::IFilteredHierarchyItemSet ^> ^ GetFilteredHierarchyItemsAsync(Microsoft::VisualStudio::Shell::IReadOnlyObservableSet<Microsoft::VisualStudio::Shell::IVsHierarchyItem ^> ^ sourceCollection, Predicate<Microsoft::VisualStudio::Shell::IVsHierarchyItem ^> ^ includeInFilter, System::Threading::CancellationToken cancellationToken, ... cli::array <int> ^ dependentProperties);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Shell.IFilteredHierarchyItemSet> GetFilteredHierarchyItemsAsync (Microsoft.VisualStudio.Shell.IReadOnlyObservableSet<Microsoft.VisualStudio.Shell.IVsHierarchyItem> sourceCollection, Predicate<Microsoft.VisualStudio.Shell.IVsHierarchyItem> includeInFilter, System.Threading.CancellationToken cancellationToken, params int[] dependentProperties);
abstract member GetFilteredHierarchyItemsAsync : Microsoft.VisualStudio.Shell.IReadOnlyObservableSet<Microsoft.VisualStudio.Shell.IVsHierarchyItem> * Predicate<Microsoft.VisualStudio.Shell.IVsHierarchyItem> * System.Threading.CancellationToken * int[] -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Shell.IFilteredHierarchyItemSet>
Public Function GetFilteredHierarchyItemsAsync (sourceCollection As IReadOnlyObservableSet(Of IVsHierarchyItem), includeInFilter As Predicate(Of IVsHierarchyItem), cancellationToken As CancellationToken, ParamArray dependentProperties As Integer()) As Task(Of IFilteredHierarchyItemSet)

Parameters

sourceCollection
IReadOnlyObservableSet<IVsHierarchyItem>

The hierarchy items to filter.

includeInFilter
Predicate<IVsHierarchyItem>

The predicate used to determine what is included in the filtered set.

cancellationToken
CancellationToken

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

dependentProperties
Int32[]

An optional set of property ids that indicate the hierarchy item properties that affect the filter and as a result cause the includeInFilter predicate to be requeried.

Returns

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

Applies to