IVsHierarchyItemCollectionProvider.GetFilteredHierarchyItemsAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从指定的层次结构项集中异步获取一组筛选的层次结构项。
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)
参数
- sourceCollection
- IReadOnlyObservableSet<IVsHierarchyItem>
要筛选的层次结构项。
- includeInFilter
- Predicate<IVsHierarchyItem>
用于确定筛选集中包含的内容的谓词。
- cancellationToken
- CancellationToken
可用于取消异步请求的取消标记。
- dependentProperties
- Int32[]
一组可选的属性 ID,指示影响筛选器的层次结构项属性,因此会导致重新查询 includeInFilter 谓词。
返回
完成时提供经过筛选的层次结构项集的任务。