Search Results for

    Show / Hide Table of Contents

    Class DelegateTreeBuilder<T>

    Implementation of ITreeBuilder<T> that uses user defined functions
    Inheritance
    object
    TreeBuilder<T>
    DelegateTreeBuilder<T>
    Implements
    ITreeBuilder<T>
    Inherited Members
    TreeBuilder<T>.SupportsCanExpand
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Terminal.Gui.Trees
    Assembly: Terminal.Gui.dll
    Syntax
    public class DelegateTreeBuilder<T> : TreeBuilder<T>, ITreeBuilder<T>
    Type Parameters
    Name Description
    T

    Constructors

    | Edit this page View Source

    DelegateTreeBuilder(Func<T, IEnumerable<T>>)

    Constructs an implementation of ITreeBuilder<T> that calls the user defined method childGetter to determine children
    Declaration
    public DelegateTreeBuilder(Func<T, IEnumerable<T>> childGetter)
    Parameters
    Type Name Description
    Func<T, IEnumerable<T>> childGetter
    | Edit this page View Source

    DelegateTreeBuilder(Func<T, IEnumerable<T>>, Func<T, bool>)

    Constructs an implementation of ITreeBuilder<T> that calls the user defined method childGetter to determine children and canExpand to determine expandability
    Declaration
    public DelegateTreeBuilder(Func<T, IEnumerable<T>> childGetter, Func<T, bool> canExpand)
    Parameters
    Type Name Description
    Func<T, IEnumerable<T>> childGetter
    Func<T, bool> canExpand

    Methods

    | Edit this page View Source

    CanExpand(T)

    Returns whether a node can be expanded based on the delegate passed during construction
    Declaration
    public override bool CanExpand(T toExpand)
    Parameters
    Type Name Description
    T toExpand
    Returns
    Type Description
    bool
    Overrides
    TreeBuilder<T>.CanExpand(T)
    | Edit this page View Source

    GetChildren(T)

    Returns children using the delegate method passed during construction
    Declaration
    public override IEnumerable<T> GetChildren(T forObject)
    Parameters
    Type Name Description
    T forObject
    Returns
    Type Description
    IEnumerable<T>
    Overrides
    TreeBuilder<T>.GetChildren(T)

    Implements

    ITreeBuilder<T>
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX