NodeAt Method
Definition
- Namespace
- Cuemon.Extensions.Runtime
- Assemblies
- Cuemon.Extensions.Core.dll
NodeAt<T>(IDecorator<IHierarchy<T>>, int)
Returns the node at the specified index of a hierarchical structure.
public static IHierarchy<T> NodeAt<T>(this IDecorator<IHierarchy<T>> decorator, int index)
Parameters
decoratorIDecorator<IHierarchy<T>>The decorator that wraps the IHierarchy<T> to extend.
indexintThe zero-based index at which a node should be retrieved in the hierarchical structure.
Returns
- IHierarchy<T>
The node at the specified
indexin the hierarchical structure.
Type Parameters
TThe type of the instance represented by the specified
decoratorin the hierarchical structure.
Exceptions
- ArgumentNullException
decoratoris null.- ArgumentOutOfRangeException
indexis less than zero - or -indexexceeded the count of nodes in the hierarchical structure.