Class DelegateTreeBuilder<T>
Implementation of ITreeBuilder<T> that uses user defined functions
public class DelegateTreeBuilder<T> : TreeBuilder<T>, ITreeBuilder<T>
Type Parameters
T
- Inheritance
-
TreeBuilder<T>DelegateTreeBuilder<T>
- Implements
-
ITreeBuilder<T>
- Inherited Members
Constructors
- DelegateTreeBuilder(Func<T, IEnumerable<T>>)
Constructs an implementation of ITreeBuilder<T> that calls the user defined method
childGetter
to determine children
- DelegateTreeBuilder(Func<T, IEnumerable<T>>, Func<T, bool>)
Constructs an implementation of ITreeBuilder<T> that calls the user defined method
childGetter
to determine children andcanExpand
to determine expandability
Methods
- CanExpand(T)
Returns whether a node can be expanded based on the delegate passed during construction
- GetChildren(T)
Returns children using the delegate method passed during construction