Search Results for

    Show / Hide Table of Contents

    Class TreeBuilder<T>

    Abstract implementation of ITreeBuilder<T>.
    Inheritance
    System.Object
    TreeBuilder<T>
    DelegateTreeBuilder<T>
    TreeNodeBuilder
    Implements
    ITreeBuilder<T>
    Inherited Members
    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: Terminal.Gui
    Assembly: Terminal.Gui.dll
    Syntax
    public abstract class TreeBuilder<T> : ITreeBuilder<T>
    Type Parameters
    Name Description
    T

    Constructors

    TreeBuilder(Boolean)

    Constructs base and initializes SupportsCanExpand
    Declaration
    public TreeBuilder(bool supportsCanExpand)
    Parameters
    Type Name Description
    System.Boolean supportsCanExpand Pass true if you intend to implement CanExpand(T) otherwise false

    Properties

    SupportsCanExpand

    Returns true if CanExpand(T) is implemented by this class
    Declaration
    public bool SupportsCanExpand { get; protected set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    CanExpand(T)

    Override this method to return a rapid answer as to whether GetChildren(T) returns results. If you are implementing this method ensure you passed true in base constructor or set SupportsCanExpand
    Declaration
    public virtual bool CanExpand(T toExpand)
    Parameters
    Type Name Description
    T toExpand
    Returns
    Type Description
    System.Boolean

    GetChildren(T)

    Returns all children of a given forObject which should be added to the tree as new branches underneath it
    Declaration
    public abstract IEnumerable<T> GetChildren(T forObject)
    Parameters
    Type Name Description
    T forObject
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>

    Implements

    ITreeBuilder<T>
    In This Article
    Back to top Generated by DocFX