Search Results for

    Show / Hide Table of Contents

    Class BaseTreeNode<T, TN>

    A class holding a typed TreeNode implementation

    Inheritance
    System.Object
    BaseHasChildren<TN>
    BaseTreeNode<T, TN>
    GridColumnGroup
    TreeNode<T>
    Implements
    ITreeNode<T, TN>
    ITreeNode<T>
    ITreeNode
    IHasChildren<TN>
    IHasChildren
    Inherited Members
    BaseHasChildren<TN>.Order
    BaseHasChildren<TN>.Children
    BaseHasChildren<TN>.AddChild(TN)
    BaseHasChildren<TN>.DeleteChild(TN)
    BaseHasChildren<TN>.ClearChildren()
    BaseHasChildren<TN>.Parent
    BaseHasChildren<TN>.AddChild(IHasChildren)
    BaseHasChildren<TN>.DeleteChild(IHasChildren)
    BaseHasChildren<TN>.IHasChildren.Children
    BaseHasChildren<TN>.IHasChildren.Parent
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: LemonEdge.Utils
    Assembly: Utils.dll
    Syntax
    public abstract class BaseTreeNode<T, TN> : BaseHasChildren<TN>, ITreeNode<T, TN>, ITreeNode<T>, ITreeNode, IHasChildren<TN>, IHasChildren where TN : BaseTreeNode<T, TN>
    Type Parameters
    Name Description
    T

    The type of item associated with each node

    TN

    The type of the node itself, must inherit BaseTreeNode<T, TN>

    Constructors

    BaseTreeNode(T)

    Creates a new treenode with the associated item

    Declaration
    protected BaseTreeNode(T item)
    Parameters
    Type Name Description
    T item

    The item for this treenode

    BaseTreeNode(T, TN)

    Creates a new treenode with the specified parent treenode, and associated item

    Declaration
    protected BaseTreeNode(T item, TN parent)
    Parameters
    Type Name Description
    T item

    The item for this treenode

    TN parent

    The parent treenode of this one

    BaseTreeNode(Func<TN, Int32>, T)

    Creates a new treenode with the associated item. Also includes a function for determining the order child treenodes are enumerated in

    Declaration
    protected BaseTreeNode(Func<TN, int> getOrder, T item)
    Parameters
    Type Name Description
    System.Func<TN, System.Int32> getOrder

    A function that returns an order for a given child treenode

    T item

    The item for this treenode

    BaseTreeNode(Func<TN, Int32>, T, TN)

    Creates a new treenode with the specified parent. Also includes a function for determining the order child treenodes are enumerated in

    Declaration
    protected BaseTreeNode(Func<TN, int> getOrder, T item, TN parent)
    Parameters
    Type Name Description
    System.Func<TN, System.Int32> getOrder

    A function that returns an order for a given child treenode

    T item

    The item for this treenode

    TN parent

    The parent treenode of this one

    Properties

    Item

    The item associated with this treenode

    Declaration
    public T Item { get; }
    Property Value
    Type Description
    T

    Methods

    AddChild(T)

    Creates a new treenode to wrap the specified item and adds it as a child to this treenode

    Declaration
    public TN AddChild(T item)
    Parameters
    Type Name Description
    T item

    The item to create a treenode for and add as a child to this treenode

    Returns
    Type Description
    TN

    The newly created treenode that has this treenode as a parent

    CreateNewItem(T, TN)

    Used to create a new instance of this treenode type

    Declaration
    protected abstract TN CreateNewItem(T item, TN parent)
    Parameters
    Type Name Description
    T item

    The item to be wrapped in a treenode

    TN parent

    Any parent treenode for this item

    Returns
    Type Description
    TN

    A new treenode with the specified item associated with it

    Explicit Interface Implementations

    ITreeNode.Item

    The item associated with this treenode

    Declaration
    object ITreeNode.Item { get; }
    Returns
    Type Description
    System.Object

    Implements

    ITreeNode<T, TN>
    ITreeNode<T>
    ITreeNode
    IHasChildren<T>
    IHasChildren

    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

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