API Reference
Class
TreeHierarchy
Builds tree nodes from hierarchical objects (groups and members, folders and files, an org chart): a function gives each item's node and another its children. Depth, width and size limits keep a large or cyclic hierarchy readable and bounded; what is left out is marked in the tree instead of being dropped silently.
Inheritance
- Object
- TreeHierarchy
Methods
public static Int32 Add<T>(TreeNode parent, IEnumerable<T?> items, Func<T?, TreeNode> node, Func<T?, IEnumerable<T?>?> children, TreeHierarchyOptions? options = null) #Returns:
Int32Adds the items and their descendants under a node.
Type Parameters
- T
- The item type.
Parameters
- parent ConsoleMonster.Widgets.TreeNode
- The node to add to (for example Tree.Root).
- items System.Collections.Generic.IEnumerable<T?>
- The top-level items.
- node System.Func<T?, ConsoleMonster.Widgets.TreeNode>
- Creates the node for an item (its label, status and note); children are added by the walk.
- children System.Func<T?, System.Collections.Generic.IEnumerable<T?>?>
- The children of an item, or null when it has none.
- options ConsoleMonster.Widgets.TreeHierarchyOptions? = null
- The limits, or null for the defaults.
Returns
The number of item nodes added (limit notes not counted).
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?