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>.AddChild(TN, bool)
    IHasChildren<TN>.DeleteChild(TN)
    IHasChildren<TN>.Children
    IHasChildren<TN>.Parent
    IHasChildren.AddChild(IHasChildren)
    IHasChildren.DeleteChild(IHasChildren)
    IHasChildren.ClearChildren()
    Namespace: LemonEdge.Utils
    Assembly: LemonEdge.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.GetAllChildren(IHasChildren)
    HasChildrenExtensions.GetLeafChildNodesOnly(IHasChildren)
    HasChildrenExtensions.GetRootParent(IHasChildren)
    HasChildrenExtensions.HasChildren(IHasChildren)
    HasChildrenExtensions.MaxTreeDepth(IHasChildren)
    HasChildrenExtensions.GetAllChildren<T>(IHasChildren<T>)
    HasChildrenExtensions.ContainsMatchingNode<T>(T, Func<T, bool>)
    HasChildrenExtensions.CopyNode<T>(T, HasChildrenExtensions.CreateCopiedNode<T>)
    HasChildrenExtensions.CopyNode<T>(T, T, HasChildrenExtensions.CreateCopiedNode<T>)
    HasChildrenExtensions.GetLeafChildNodesOnly<T>(T)
    HasChildrenExtensions.GetMatchingNode<T>(T, Func<T, bool>)
    HasChildrenExtensions.GetPath<T>(T, string, Func<T, string>)
    HasChildrenExtensions.GetRootParent<T>(T)
    HasChildrenExtensions.GetRootToNode<T>(T)
    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)

    See Also

    ITreeNode
    ITreeNode<T>
    TreeNode
    BaseTreeNode<T, TN>
    TreeNode<T>
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.