Interface ITreeNode<T, TN>
Generalizes a property that a class implements that provides an associated Item that is of the same treenode type again, that can be held against the class while also having child items through the IHasChildren<T> interface implementation.
Inherited Members
Namespace: LemonEdge.Utils
Assembly: Utils.dll
Syntax
public interface ITreeNode<T, TN> : ITreeNode<T>, ITreeNode, IHasChildren<TN>, IHasChildren where TN : ITreeNode<T, TN>
Type Parameters
Name | Description |
---|---|
T | The specified type of the Item property |
TN | The type of the child items in this treenode. By ensuring this is restricted to being a type of itself then we have effectively ensured all child items are of the same ITreeNode<T, TN> type |
Remarks
Implementing this interface ensures you are providing a type enforced implementation of a TreeNode where the root item and all child items are of the same type.
Properties
Item
The associated item of type T held against the class implementing this ITreeNode<T, TN> implementation
Declaration
T Item { get; }
Property Value
Type | Description |
---|---|
T | The item associated with this treenode |