Show / Hide Table of Contents

    Class HierarchyUtility

    This utility class is designed to make object hierarchy operations easier to work with.

    Inheritance
    System.Object
    HierarchyUtility
    Namespace: Cuemon
    Assembly: Cuemon.Core.dll
    Syntax
    public static class HierarchyUtility

    Methods

    | Improve this Doc

    WhileSourceTraversalHasElements<TSource>(TSource, Func<TSource, IEnumerable<TSource>>)

    Invokes the specified traversal path of source until obstructed by an empty sequence.

    Declaration
    public static IEnumerable<TSource> WhileSourceTraversalHasElements<TSource>(TSource source, Func<TSource, IEnumerable<TSource>> traversal)
        where TSource : class
    Parameters
    Type Name Description
    TSource source

    The source to travel until the traversal path is obstructed by an empty sequence.

    System.Func<TSource, System.Collections.Generic.IEnumerable<TSource>> traversal

    The function delegate that is invoked until the traveled path is obstructed by an empty sequence.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TSource>

    An System.Collections.Generic.IEnumerable<T> sequence equal to the traveled path of source.

    Type Parameters
    Name Description
    TSource

    The type of the source.

    Exceptions
    Type Condition
    System.ArgumentNullException

    source -or- traversal is null.

    | Improve this Doc

    WhileSourceTraversalIsNotNull<TSource>(TSource, Func<TSource, TSource>)

    Invokes the specified traversal path of source until obstructed by a null value.

    Declaration
    public static IEnumerable<TSource> WhileSourceTraversalIsNotNull<TSource>(TSource source, Func<TSource, TSource> traversal)
        where TSource : class
    Parameters
    Type Name Description
    TSource source

    The source to travel until the traversal path is obstructed by a null value.

    System.Func<TSource, TSource> traversal

    The function delegate that is invoked until the traveled path is obstructed by a null value.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TSource>

    An System.Collections.Generic.IEnumerable<T> sequence equal to the traveled path of source.

    Type Parameters
    Name Description
    TSource

    The type of the source.

    Exceptions
    Type Condition
    System.ArgumentNullException

    source -or- traversal is null.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX