Search Results for

    Show / Hide Table of Contents

    Interface IHasChildren<T>

    Indicates this item has children that are all typed to be of the same type

    Inherited Members
    IHasChildren.AddChild(IHasChildren)
    IHasChildren.DeleteChild(IHasChildren)
    IHasChildren.ClearChildren()
    Namespace: LemonEdge.Utils
    Assembly: LemonEdge.Utils.dll
    Syntax
    public interface IHasChildren<T> : IHasChildren where T : IHasChildren<T>
    Type Parameters
    Name Description
    T

    The item type that implements IHasChildren and that all child items are of

    Properties

    Children

    List of Children contained within this item

    Declaration
    IEnumerable<T> Children { get; }
    Property Value
    Type Description
    IEnumerable<T>

    Parent

    Holds a link to the parent item (if there is one) that this item is a child of

    Declaration
    T Parent { get; }
    Property Value
    Type Description
    T

    Methods

    AddChild(T, bool)

    Adds a child item to the collection of Children in this item

    Declaration
    void AddChild(T item, bool allowDuplicate = false)
    Parameters
    Type Name Description
    T item

    The item to add to this items Children. It can not already have another Parent, and this method will set its Parent to this item itself

    bool allowDuplicate

    DeleteChild(T)

    Removes a child item from the collection of Children in this item

    Declaration
    void DeleteChild(T item)
    Parameters
    Type Name Description
    T item

    The item to remove from this items Children

    Extension Methods

    HasChildrenExtensions.GetAllChildren(IHasChildren)
    HasChildrenExtensions.GetLeafChildNodesOnly(IHasChildren)
    HasChildrenExtensions.GetRootParent(IHasChildren)
    HasChildrenExtensions.HasChildren(IHasChildren)
    HasChildrenExtensions.MaxTreeDepth(IHasChildren)
    HasChildrenExtensions.ContainsMatchingNode<T>(T, Func<T, bool>)
    HasChildrenExtensions.CopyNode<T>(T, HasChildrenExtensions.CreateCopiedNode<T>)
    HasChildrenExtensions.CopyNode<T>(T, T, HasChildrenExtensions.CreateCopiedNode<T>)
    HasChildrenExtensions.GetAllChildren<T>(IHasChildren<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

    IHasChildren
    BaseHasChildren<T>
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.