Show / Hide Table of Contents

    Class Hierarchy<T>

    Represents a way to expose a node of a hierarchical structure, including the node object of type T.

    Inheritance
    System.Object
    Wrapper<T>
    Hierarchy<T>
    Implements
    IHierarchy<T>
    IWrapper<T>
    IData
    Inherited Members
    Wrapper<T>.Instance
    Wrapper<T>.InstanceType
    Wrapper<T>.MemberReference
    Wrapper<T>.HasMemberReference
    Wrapper<T>.Data
    Wrapper<T>.InstanceAs<TResult>()
    Wrapper<T>.InstanceAs<TResult>(IFormatProvider)
    Namespace: Cuemon
    Assembly: Cuemon.Core.dll
    Syntax
    public sealed class Hierarchy<T> : Wrapper<T>, IHierarchy<T>, IWrapper<T>, IData
    Type Parameters
    Name Description
    T

    The type of the object represented in the hierarchical structure.

    Constructors

    | Improve this Doc

    Hierarchy()

    Initializes a new instance of the Hierarchy<T> class.

    Declaration
    public Hierarchy()

    Properties

    | Improve this Doc

    Depth

    Gets the current depth of the node in the hierarchical structure.

    Declaration
    public int Depth { get; }
    Property Value
    Type Description
    System.Int32

    The current depth of the in the hierarchical structure.

    | Improve this Doc

    HasChildren

    Gets a value indicating whether this instance has any children.

    Declaration
    public bool HasChildren { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance has any children; otherwise, false.

    | Improve this Doc

    HasParent

    Gets a value indicating whether this instance has a parent.

    Declaration
    public bool HasParent { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance has a parent; otherwise, false.

    | Improve this Doc

    Index

    Gets the zero-based index of the current node that this hierarchical structure represents.

    Declaration
    public int Index { get; }
    Property Value
    Type Description
    System.Int32

    The zero-based index of the current node that this hierarchical structure represents.

    | Improve this Doc

    Item[Int32]

    Gets the node at the specified index.

    Declaration
    public IHierarchy<T> this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type Description
    IHierarchy<T>

    The node at the specified index.

    Methods

    | Improve this Doc

    Add(T)

    Adds the specified instance to a node in the hierarchical structure representation.

    Declaration
    public IHierarchy<T> Add(T instance)
    Parameters
    Type Name Description
    T instance

    The instance to a node in the hierarchical structure represents.

    Returns
    Type Description
    IHierarchy<T>

    A reference to the newly added hierarchical node.

    | Improve this Doc

    Add(T, MemberInfo)

    Adds the specified instance to a node in the hierarchical structure representation.

    Declaration
    public IHierarchy<T> Add(T instance, MemberInfo member)
    Parameters
    Type Name Description
    T instance

    The instance to a node in the hierarchical structure represents.

    System.Reflection.MemberInfo member

    The member from where instance was referenced.

    Returns
    Type Description
    IHierarchy<T>

    A reference to the newly added hierarchical node.

    | Improve this Doc

    Add(T, Type)

    Adds the specified instance to a node in the hierarchical structure representation.

    Declaration
    public IHierarchy<T> Add(T instance, Type instanceType)
    Parameters
    Type Name Description
    T instance

    The instance to a node in the hierarchical structure represents.

    System.Type instanceType

    The type of instance.

    Returns
    Type Description
    IHierarchy<T>

    A reference to the newly added hierarchical node.

    Exceptions
    Type Condition
    System.ArgumentNullException

    instanceType is null.

    | Improve this Doc

    Add(T, Type, MemberInfo)

    Adds the specified instance to a node in the hierarchical structure representation.

    Declaration
    public IHierarchy<T> Add(T instance, Type instanceType, MemberInfo member)
    Parameters
    Type Name Description
    T instance

    The instance to a node in the hierarchical structure represents.

    System.Type instanceType

    The type of instance.

    System.Reflection.MemberInfo member

    The member from where instance was referenced.

    Returns
    Type Description
    IHierarchy<T>

    A reference to the newly added hierarchical node.

    Exceptions
    Type Condition
    System.ArgumentNullException

    instanceType is null.

    | Improve this Doc

    GetChildren()

    Gets an System.Collections.Generic.IEnumerable<T> sequence that represents all the child nodes of the current hierarchical node.

    Declaration
    public IEnumerable<IHierarchy<T>> GetChildren()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<IHierarchy<T>>

    An System.Collections.Generic.IEnumerable<T> sequence that represents all the child nodes of the current hierarchical node.

    | Improve this Doc

    GetParent()

    Gets the parent node of the current node in the hierarchical structure.

    Declaration
    public IHierarchy<T> GetParent()
    Returns
    Type Description
    IHierarchy<T>

    The parent node of the current node in the hierarchical structure.

    | Improve this Doc

    GetPath()

    Gets the hierarchical path of the node in the hierarchical structure.

    Declaration
    public string GetPath()
    Returns
    Type Description
    System.String

    A System.String that identifies the hierarchical path relative to the current node.

    | Improve this Doc

    GetPath(Func<IHierarchy<T>, String>)

    Gets the hierarchical path of the node in the hierarchical structure.

    Declaration
    public string GetPath(Func<IHierarchy<T>, string> pathResolver)
    Parameters
    Type Name Description
    System.Func<IHierarchy<T>, System.String> pathResolver

    The function delegate path resolver.

    Returns
    Type Description
    System.String

    A System.String that identifies the hierarchical path relative to the current node.

    | Improve this Doc

    Replace(T)

    Allows for the instance on the current node to be replaced with a new instance.

    Declaration
    public void Replace(T instance)
    Parameters
    Type Name Description
    T instance

    The new instance to replace the original with.

    | Improve this Doc

    Replace(T, Type)

    Allows for the instance on the current node to be replaced with a new instance.

    Declaration
    public void Replace(T instance, Type instanceType)
    Parameters
    Type Name Description
    T instance

    The new instance to replace the original with.

    System.Type instanceType

    The type of the new instance.

    Implements

    IHierarchy<T>
    IWrapper<T>
    IData

    Extension Methods

    ConverterExtensions.ParseWith<TSource, TResult>(TSource, Func<TSource, TResult>)
    ConverterExtensions.ParseWith<TSource, T, TResult>(TSource, Func<TSource, T, TResult>, T)
    ConverterExtensions.ParseWith<TSource, T1, T2, TResult>(TSource, Func<TSource, T1, T2, TResult>, T1, T2)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, TResult>(TSource, Func<TSource, T1, T2, T3, TResult>, T1, T2, T3)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, TResult>(TSource, Func<TSource, T1, T2, T3, T4, TResult>, T1, T2, T3, T4)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, TResult>, T1, T2, T3, T4, T5, T6)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>, T1, T2, T3, T4, T5, T6, T7)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>, T1, T2, T3, T4, T5, T6, T7, T8)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>, T1, T2, T3, T4, T5, T6, T7, T8, T9)
    ConverterExtensions.As<TResult>(Object)
    ConverterExtensions.As<TResult>(Object, TResult)
    ConverterExtensions.As<TResult>(Object, TResult, IFormatProvider)
    DelegateUtilityExtensions.Wrap<TResult>(TResult)
    DelegateUtilityExtensions.DynamicWrap<TResult>(TResult)
    HierarchyExtensions.FindFirstInstance<T>(IHierarchy<T>, Func<IHierarchy<T>, Boolean>)
    HierarchyExtensions.FindSingleInstance<T>(IHierarchy<T>, Func<IHierarchy<T>, Boolean>)
    HierarchyExtensions.FindInstance<T>(IHierarchy<T>, Func<IHierarchy<T>, Boolean>)
    HierarchyExtensions.FindFirst<T>(IHierarchy<T>, Func<IHierarchy<T>, Boolean>)
    HierarchyExtensions.FindSingle<T>(IHierarchy<T>, Func<IHierarchy<T>, Boolean>)
    HierarchyExtensions.Find<T>(IHierarchy<T>, Func<IHierarchy<T>, Boolean>)
    HierarchyExtensions.Replace<T>(IHierarchy<T>, Action<IHierarchy<T>, T>)
    HierarchyExtensions.Root<T>(IHierarchy<T>)
    HierarchyExtensions.AncestorsAndSelf<T>(IHierarchy<T>)
    HierarchyExtensions.DescendantsAndSelf<T>(IHierarchy<T>)
    HierarchyExtensions.SiblingsAndSelf<T>(IHierarchy<T>)
    HierarchyExtensions.SiblingsAndSelfAt<T>(IHierarchy<T>, Int32)
    HierarchyExtensions.NodeAt<T>(IHierarchy<T>, Int32)
    HierarchyExtensions.FlattenAll<T>(IHierarchy<T>)
    TweakerExtensions.Adjust<T>(T, Func<T, T>)
    TypeUtilityExtensions.Is<T>(Object)
    TypeUtilityExtensions.IsNot<T>(Object)
    TypeUtilityExtensions.IsNullable<T>(T)
    WrapperExtensions.UseWrapper<T>(T, Action<IDictionary<String, Object>>)
    WrapperExtensions.UseWrapper<T>(T, MemberInfo, Action<IDictionary<String, Object>>)
    EnumerableUtilityExtensions.Yield<TSource>(TSource)
    HashUtilityExtensions.ComputeHash(Object, Action<HashOptions>)
    HmacUtilityExtensions.ComputeKeyedHash(Object, Byte[], Action<KeyedHashOptions>)
    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX