IVsHierarchyItemCollectionProvider.GetDescendantsAsync Method
Asynchronously gets a flat list of hierarchy items that exist within the specified hierarchy.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.Immutable.11.0 (in Microsoft.VisualStudio.Shell.Immutable.11.0.dll)
Syntax
'Declaration
Function GetDescendantsAsync ( _
hierarchy As IVsHierarchy, _
cancellationToken As CancellationToken _
) As Task(Of IReadOnlyObservableSet(Of IVsHierarchyItem))
Task<IReadOnlyObservableSet<IVsHierarchyItem>> GetDescendantsAsync(
IVsHierarchy hierarchy,
CancellationToken cancellationToken
)
Task<IReadOnlyObservableSet<IVsHierarchyItem^>^>^ GetDescendantsAsync(
IVsHierarchy^ hierarchy,
CancellationToken cancellationToken
)
abstract GetDescendantsAsync :
hierarchy:IVsHierarchy *
cancellationToken:CancellationToken -> Task<IReadOnlyObservableSet<IVsHierarchyItem>>
function GetDescendantsAsync(
hierarchy : IVsHierarchy,
cancellationToken : CancellationToken
) : Task<IReadOnlyObservableSet<IVsHierarchyItem>>
Parameters
hierarchy
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchyThe hierarchy from which the descendant hierarchy items are aggregated.
cancellationToken
Type: System.Threading.CancellationTokenA cancellation token that can be used to cancel the asynchronous request.
Return Value
Type: System.Threading.Tasks.Task<IReadOnlyObservableSet<IVsHierarchyItem>>
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.