Class HierarchyUtility
This utility class is designed to make object hierarchy operations easier to work with.
Inheritance
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public static class HierarchyUtility
Methods
| Improve this DocWhileSourceTraversalHasElements<TSource>(TSource, Func<TSource, IEnumerable<TSource>>)
Invokes the specified traversal
path of source
until obstructed by an empty sequence.
Declaration
public static IEnumerable<TSource> WhileSourceTraversalHasElements<TSource>(TSource source, Func<TSource, IEnumerable<TSource>> traversal)
where TSource : class
Parameters
Type | Name | Description |
---|---|---|
TSource | source | The source to travel until the |
System.Func<TSource, System.Collections.Generic.IEnumerable<TSource>> | traversal | The function delegate that is invoked until the traveled path is obstructed by an empty sequence. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TSource> | An System.Collections.Generic.IEnumerable<T> sequence equal to the traveled path of |
Type Parameters
Name | Description |
---|---|
TSource | The type of the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
WhileSourceTraversalIsNotNull<TSource>(TSource, Func<TSource, TSource>)
Invokes the specified traversal
path of source
until obstructed by a null value.
Declaration
public static IEnumerable<TSource> WhileSourceTraversalIsNotNull<TSource>(TSource source, Func<TSource, TSource> traversal)
where TSource : class
Parameters
Type | Name | Description |
---|---|---|
TSource | source | The source to travel until the |
System.Func<TSource, TSource> | traversal | The function delegate that is invoked until the traveled path is obstructed by a null value. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TSource> | An System.Collections.Generic.IEnumerable<T> sequence equal to the traveled path of |
Type Parameters
Name | Description |
---|---|
TSource | The type of the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|