Class DelegateTreeBuilder<T>
Inheritance
DelegateTreeBuilder<T>
Assembly: Terminal.Gui.dll
Syntax
public class DelegateTreeBuilder<T> : TreeBuilder<T>, ITreeBuilder<T>
Type Parameters
Constructors
|
Edit this page
View Source
DelegateTreeBuilder(Func<T, IEnumerable<T>>)
Constructs an implementation of
ITreeBuilder<T> that calls the user
defined method
childGetter to determine children
Declaration
public DelegateTreeBuilder(Func<T, IEnumerable<T>> childGetter)
Parameters
|
Edit this page
View Source
DelegateTreeBuilder(Func<T, IEnumerable<T>>, Func<T, bool>)
Constructs an implementation of
ITreeBuilder<T> that calls the user
defined method
childGetter to determine children
and
canExpand to determine expandability
Declaration
public DelegateTreeBuilder(Func<T, IEnumerable<T>> childGetter, Func<T, bool> canExpand)
Parameters
Methods
|
Edit this page
View Source
CanExpand(T)
Returns whether a node can be expanded based on the delegate passed during construction
Declaration
public override bool CanExpand(T toExpand)
Parameters
| Type |
Name |
Description |
| T |
toExpand |
|
Returns
Overrides
|
Edit this page
View Source
GetChildren(T)
Returns children using the delegate method passed during construction
Declaration
public override IEnumerable<T> GetChildren(T forObject)
Parameters
| Type |
Name |
Description |
| T |
forObject |
|
Returns
Overrides
Implements