Search Results for

    Show / Hide Table of Contents

    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
    IHasChildren<TN>.Children
    IHasChildren<TN>.AddChild(TN)
    IHasChildren<TN>.DeleteChild(TN)
    IHasChildren<TN>.Parent
    IHasChildren.AddChild(IHasChildren)
    IHasChildren.DeleteChild(IHasChildren)
    IHasChildren.ClearChildren()
    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

    Extension Methods

    HasChildrenExtensions.HasChildren(IHasChildren)
    HasChildrenExtensions.GetAllChildren(IHasChildren)
    HasChildrenExtensions.GetRootParent(IHasChildren)
    HasChildrenExtensions.GetLeafChildNodesOnly(IHasChildren)
    HasChildrenExtensions.GetAllChildren<T>(IHasChildren<T>)
    HasChildrenExtensions.GetRootParent<T>(T)
    HasChildrenExtensions.GetLeafChildNodesOnly<T>(T)
    HasChildrenExtensions.ContainsMatchingNode<T>(T, Func<T, Boolean>)
    HasChildrenExtensions.GetMatchingNode<T>(T, Func<T, Boolean>)
    HasChildrenExtensions.MaxTreeDepth(IHasChildren)
    HasChildrenExtensions.GetRootToNode<T>(T)
    HasChildrenExtensions.GetPath<T>(T, String, Func<T, String>)
    MiscExtensions.SetIfNotEqual<T, P>(T, Expression<Func<T, P>>, P)
    ReflectionExtensions.ClearEventInvocations(Object, String)
    StringExtensions.ToCSVFormatString(Object, Type)
    SQLExtensions.ToSQLValue(Object, Boolean)

    See Also

    ITreeNode
    ITreeNode<T>
    TreeNode
    BaseTreeNode<T, TN>
    TreeNode<T>
    In This Article
    Back to top © LemonTree Software Ltd. All rights reserved.