SiblingsAndSelfAt Method
Definition
- Namespace
- Cuemon.Extensions.Runtime
- Assemblies
- Cuemon.Extensions.Core.dll
SiblingsAndSelfAt<T>(IDecorator<IHierarchy<T>>, int)
Gets all siblings and self after the current decorator in the hierarchical structure.
public static IEnumerable<IHierarchy<T>> SiblingsAndSelfAt<T>(this IDecorator<IHierarchy<T>> decorator, int depth)
Parameters
decoratorIDecorator<IHierarchy<T>>The decorator that wraps the IHierarchy<T> to extend.
depthintThe depth in the hierarchical structure from where to locate the siblings and self nodes.
Returns
- IEnumerable<IHierarchy<T>>
An IEnumerable<T> sequence equal to the siblings and self of the specified
decorator.
Type Parameters
TThe type of the instance represented by the specified
decoratorin the hierarchical structure.
Exceptions
- ArgumentNullException
decoratoris null.- ArgumentOutOfRangeException
depthis less than zero.