Class TreeNode
Holds an associated Item and child TreeNode items through the BaseHasChildren<T> implementation.
Inherited Members
Namespace: LemonEdge.Utils
Assembly: LemonEdge.Utils.dll
Syntax
public class TreeNode : BaseHasChildren<TreeNode>, IHasChildren<TreeNode>, ITreeNode, IHasChildren
Constructors
TreeNode(Func<object, int>, object)
Creates a new TreeNode with the specified item as the associated Item for this TreeNode, along with a specified function to determine the order of the Children items
Declaration
public TreeNode(Func<object, int> getOrder, object item)
Parameters
Type | Name | Description |
---|---|---|
Func<object, int> | getOrder | A function that specifies how to order the child items of this TreeNode |
object | item | The Item for this TreeNode |
TreeNode(Func<object, int>, object, TreeNode)
Creates a new TreeNode with the specified item as the associated Item for this TreeNode, along with the specified parent as the Parent of this TreeNode, and with a specified function to determine the order of the Children items
Declaration
public TreeNode(Func<object, int> getOrder, object item, TreeNode parent)
Parameters
Type | Name | Description |
---|---|---|
Func<object, int> | getOrder | A function that specifies how to order the child items of this TreeNode |
object | item | The Item for this TreeNode |
TreeNode | parent | The Parent of this TreeNode |
TreeNode(object)
Creates a new TreeNode with the specified item as the associated Item for this TreeNode
Declaration
public TreeNode(object item)
Parameters
Type | Name | Description |
---|---|---|
object | item | The Item for this TreeNode |
TreeNode(object, TreeNode)
Creates a new TreeNode with the specified item as the associated Item for this TreeNode, along with the specified parent as the Parent of this TreeNode
Declaration
public TreeNode(object item, TreeNode parent)
Parameters
Type | Name | Description |
---|---|---|
object | item | The Item for this TreeNode |
TreeNode | parent | The Parent of this TreeNode |
Properties
Item
The associated item held against the class implementing this ITreeNode implementation
Declaration
public object Item { get; }
Property Value
Type | Description |
---|---|
object | The item associated with this treenode |