TreeNodeExtensions Type

Implements algorithms common for all trees.

Static members

Static member Description

TreeNodeExtensions.AnyBetweenHereAndLeaves(node, condition)

Full Usage: TreeNodeExtensions.AnyBetweenHereAndLeaves(node, condition)

Parameters:
    node : 'T
    condition : Func<'T, bool>

Returns: 'T

node : 'T
condition : Func<'T, bool>
Returns: 'T

TreeNodeExtensions.AnyBetweenLeavesAndHere(node, condition)

Full Usage: TreeNodeExtensions.AnyBetweenLeavesAndHere(node, condition)

Parameters:
    node : 'T
    condition : Func<'T, bool>

Returns: 'T

node : 'T
condition : Func<'T, bool>
Returns: 'T

TreeNodeExtensions.AreAllNodesFromSameLevel(selNodes)

Full Usage: TreeNodeExtensions.AreAllNodesFromSameLevel(selNodes)

Parameters:
Returns: bool True if all nodes have the same level; otherwise false. False is also returned if the provided enumeration was empty.

Determines whether all nodes in the provided enumeration have the same level (see TreeNodeExtensions.Level for an explanation of level).

selNodes : IEnumerable<'T>

Enumeration of nodes

Returns: bool

True if all nodes have the same level; otherwise false. False is also returned if the provided enumeration was empty.

TreeNodeExtensions.ElementAt(rootNode, index)

Full Usage: TreeNodeExtensions.ElementAt(rootNode, index)

Parameters:
    rootNode : 'T - The root node of the tree.
    index : IEnumerable<int> - The index array. The member at index 0 must always be 0, since this indicates the provided root node. Examples: {0} designates the root node; {0, 1} designates the 2nd child of the root node; {0,1,0} designates the first child of the second child of the root node.

Returns: 'T The node that is designated by the provided index.

Gets a node inside a tree by using an index array.

rootNode : 'T

The root node of the tree.

index : IEnumerable<int>

The index array. The member at index 0 must always be 0, since this indicates the provided root node. Examples: {0} designates the root node; {0, 1} designates the 2nd child of the root node; {0,1,0} designates the first child of the second child of the root node.

Returns: 'T

The node that is designated by the provided index.

ArgumentNullException rootNode
ArgumentOutOfRangeException Index list is null or empty; or index[0] is not 0; or index is otherwise invalid.

TreeNodeExtensions.EnsureValidityOfNodeIndex(rootNode, index)

Full Usage: TreeNodeExtensions.EnsureValidityOfNodeIndex(rootNode, index)

Parameters:
    rootNode : 'T - The root node of the tree.
    index : IList<int> - The index list. On return, it is ensured that this index list designates a valid index of a node inside the tree.

Returns: bool True if the index list was changed to ensure validity, False if it was not neccessary to change the index list.

Ensures that a list of indices that point to a node in a tree is valid.

rootNode : 'T

The root node of the tree.

index : IList<int>

The index list. On return, it is ensured that this index list designates a valid index of a node inside the tree.

Returns: bool

True if the index list was changed to ensure validity, False if it was not neccessary to change the index list.

TreeNodeExtensions.FirstAncestorImplementing(node)

Full Usage: TreeNodeExtensions.FirstAncestorImplementing(node)

Parameters:
    node : 'T - The node. The first node being considered is the parent node of this node.

Returns: 'M

Returns the firsts ancestor of this node that has the type M.

node : 'T

The node. The first node being considered is the parent node of this node.

Returns: 'M

TreeNodeExtensions.FixAndTestParentChildRelations(node, Set1stArgParentNodeTo2ndArg)

Full Usage: TreeNodeExtensions.FixAndTestParentChildRelations(node, Set1stArgParentNodeTo2ndArg)

Parameters:
    node : 'T - The node where the test starts (normally the root node of the tree).
    Set1stArgParentNodeTo2ndArg : Action<'T, 'T> - Action to set the Parent node property of a node given as the 1st argument to a node given as 2nd argument.

Returns: bool True if something changed (i.e. the parent-child relationship was broken), false otherwise.

Fixes the and test the parent-child relationship in a tree.

node : 'T

The node where the test starts (normally the root node of the tree).

Set1stArgParentNodeTo2ndArg : Action<'T, 'T>

Action to set the Parent node property of a node given as the 1st argument to a node given as 2nd argument.

Returns: bool

True if something changed (i.e. the parent-child relationship was broken), false otherwise.

ArgumentNullException node is null or Set1stArgParentNodeTo2ndArg is null.

TreeNodeExtensions.FromHereToLeavesDo(node, action)

Full Usage: TreeNodeExtensions.FromHereToLeavesDo(node, action)

Parameters:
    node : 'T
    action : Action<'T>

node : 'T
action : Action<'T>

TreeNodeExtensions.FromLeavesToHereDo(node, action)

Full Usage: TreeNodeExtensions.FromLeavesToHereDo(node, action)

Parameters:
    node : 'T
    action : Action<'T>

node : 'T
action : Action<'T>

TreeNodeExtensions.HaveSameParent(nodes)

Full Usage: TreeNodeExtensions.HaveSameParent(nodes)

Parameters:
Returns: bool True if all nodes in the enumeration share the same parent. An exception is thrown if the enumeration is empty or contains empty elements.

Determines whether a couple of nodes share the same parent node.

nodes : IEnumerable<'T>

The nodes.

Returns: bool

True if all nodes in the enumeration share the same parent. An exception is thrown if the enumeration is empty or contains empty elements.

TreeNodeExtensions.IndexOf(node)

Full Usage: TreeNodeExtensions.IndexOf(node)

Parameters:
    node : 'T - The node for which the index is determined.

Returns: IList<int> Index of the node inside the tree.

Gets the index of a given node inside a tree.

node : 'T

The node for which the index is determined.

Returns: IList<int>

Index of the node inside the tree.

TreeNodeExtensions.IndexOf(node, existingList)

Full Usage: TreeNodeExtensions.IndexOf(node, existingList)

Parameters:
    node : 'T - The node for which the index is determined.
    existingList : IList<int> - List that can be used to hold the indices. If this parameter is null, a new List will be created.

Returns: IList<int> Index of the node inside the tree. If existingList was not null, the existingList is returned. Otherwise, a new list is returned.

Gets the index of a given node inside a tree.

node : 'T

The node for which the index is determined.

existingList : IList<int>

List that can be used to hold the indices. If this parameter is null, a new List will be created.

Returns: IList<int>

Index of the node inside the tree. If existingList was not null, the existingList is returned. Otherwise, a new list is returned.

TreeNodeExtensions.Insert(rootNode, index, nodeToInsert)

Full Usage: TreeNodeExtensions.Insert(rootNode, index, nodeToInsert)

Parameters:
    rootNode : 'T - The root node of the tree.
    index : IEnumerable<int> - The index inside the tree where the node should be inserted.
    nodeToInsert : 'T - The node to insert.

Inserts the specified node at a certain index in the tree.

rootNode : 'T

The root node of the tree.

index : IEnumerable<int>

The index inside the tree where the node should be inserted.

nodeToInsert : 'T

The node to insert.

TreeNodeExtensions.InsertAfter(rootNode, index, nodeToInsert)

Full Usage: TreeNodeExtensions.InsertAfter(rootNode, index, nodeToInsert)

Parameters:
    rootNode : 'T - The root node of the tree.
    index : IEnumerable<int> - The index inside the tree after which the node should be inserted.
    nodeToInsert : 'T - The node to insert.

Inserts the specified node after a certain index in the tree.

rootNode : 'T

The root node of the tree.

index : IEnumerable<int>

The index inside the tree after which the node should be inserted.

nodeToInsert : 'T

The node to insert.

TreeNodeExtensions.InsertLast(rootNode, index, nodeToInsert)

Full Usage: TreeNodeExtensions.InsertLast(rootNode, index, nodeToInsert)

Parameters:
    rootNode : 'T - The root node of the tree.
    index : IEnumerable<int> - The index inside the tree that points to a node. The nodeToInsert is inserted at the end of the same collection that this node belongs to.
    nodeToInsert : 'T - The node to insert.

Inserts the specified node after all other siblings of the node at a certain index in the tree.

rootNode : 'T

The root node of the tree.

index : IEnumerable<int>

The index inside the tree that points to a node. The nodeToInsert is inserted at the end of the same collection that this node belongs to.

nodeToInsert : 'T

The node to insert.

TreeNodeExtensions.IsStructuralEquivalentTo(tree1, tree2, AreNodesEquivalent)

Full Usage: TreeNodeExtensions.IsStructuralEquivalentTo(tree1, tree2, AreNodesEquivalent)

Parameters:
    tree1 : 'T
    tree2 : 'M
    AreNodesEquivalent : Func<'T, 'M, bool>

Returns: bool

tree1 : 'T
tree2 : 'M
AreNodesEquivalent : Func<'T, 'M, bool>
Returns: bool

TreeNodeExtensions.IsValidIndex(rootNode, index)

Full Usage: TreeNodeExtensions.IsValidIndex(rootNode, index)

Parameters:
    rootNode : 'T - The root node of the tree.
    index : IEnumerable<int> - The index that points to a node inside the tree.

Returns: bool true if the given index is valid; otherwise, false.

Determines whether the given index is valid or not.

rootNode : 'T

The root node of the tree.

index : IEnumerable<int>

The index that points to a node inside the tree.

Returns: bool

true if the given index is valid; otherwise, false.

TreeNodeExtensions.IsValidIndex(rootNode, index, nodeAtIndex)

Full Usage: TreeNodeExtensions.IsValidIndex(rootNode, index, nodeAtIndex)

Parameters:
    rootNode : 'T - The root node of the tree.
    index : IEnumerable<int> - The index that points to a node inside the tree.
    nodeAtIndex : byref<'T> - If the return value was true, this parameter contains the node at the given index.

Returns: bool true if the given index is valid; otherwise, false.

Determines whether the given index is valid or not.

rootNode : 'T

The root node of the tree.

index : IEnumerable<int>

The index that points to a node inside the tree.

nodeAtIndex : byref<'T>

If the return value was true, this parameter contains the node at the given index.

Returns: bool

true if the given index is valid; otherwise, false.

TreeNodeExtensions.Level(node)

Full Usage: TreeNodeExtensions.Level(node)

Parameters:
    node : 'T - The node for which the level is returned.

Returns: int The node's level.

Determines the level of the specified node. The root node (= node that has no parent) will return a level of 0, the child nodes of the root node a level of 1 and so on.

node : 'T

The node for which the level is returned.

Returns: int

The node's level.

ArgumentNullException node is null.

TreeNodeExtensions.MoveNodesUpDown(indexDelta, nodesToMove)

Full Usage: TreeNodeExtensions.MoveNodesUpDown(indexDelta, nodesToMove)

Parameters:
    indexDelta : int - Number of movement steps. Value less than zero will move up the nodes in the tree, values greater null will move down the nodes in the tree.
    nodesToMove : IEnumerable<'T> - Nodes to move.

Returns: int The number of indices the nodes were moved (either a positive number if the nodes where moved to higher indices, or negative if the nodes were moved to lower indices).

This procedure will move nodes some indices up or down. All nodes to move should have the same parent.

The following assumptions must be fullfilled:

The nodes have to have the same parent, otherwise an exception is thrown.

indexDelta : int

Number of movement steps. Value less than zero will move up the nodes in the tree, values greater null will move down the nodes in the tree.

nodesToMove : IEnumerable<'T>

Nodes to move.

Returns: int

The number of indices the nodes were moved (either a positive number if the nodes where moved to higher indices, or negative if the nodes were moved to lower indices).

TreeNodeExtensions.NodesOfSameHighestLevel(nodes)

Full Usage: TreeNodeExtensions.NodesOfSameHighestLevel(nodes)

Parameters:
Returns: HashSet<'T> Only those nodes wich have the same highest level number among all the provided nodes.

Returns only the nodes with the highest hierarchy level among all the provided nodes (i.e. the nodes most close to the leaf nodes of the true). First, the nodes collection is iterated through to determine the highest node level. Then only those nodes with the hightest node level are returned.

nodes : IEnumerable<'T>

Nodes to filter.

Returns: HashSet<'T>

Only those nodes wich have the same highest level number among all the provided nodes.

TreeNodeExtensions.ProjectTreeToNewTree(sourceRoot, createDestinationNodeFromSourceNode, addChildToDestinationNode)

Full Usage: TreeNodeExtensions.ProjectTreeToNewTree(sourceRoot, createDestinationNodeFromSourceNode, addChildToDestinationNode)

Parameters:
    sourceRoot : 'S - The source root tree node.
    createDestinationNodeFromSourceNode : Func<'S, 'D> - Function used to create a destination node from a source node.
    addChildToDestinationNode : Action<'D, 'D> - Procedure to add a child node to a destination node (first argument is the parent node, 2nd argument is the child node).

Returns: 'D The root node of the newly created destination tree that reflects the structure of the source tree.

Projects a tree (source tree) to a new tree (destination tree).

sourceRoot : 'S

The source root tree node.

createDestinationNodeFromSourceNode : Func<'S, 'D>

Function used to create a destination node from a source node.

addChildToDestinationNode : Action<'D, 'D>

Procedure to add a child node to a destination node (first argument is the parent node, 2nd argument is the child node).

Returns: 'D

The root node of the newly created destination tree that reflects the structure of the source tree.

TreeNodeExtensions.ProjectTreeToNewTree(sourceRoot, indices, createDestinationNodeFromSourceNode, addChildToDestinationNode)

Full Usage: TreeNodeExtensions.ProjectTreeToNewTree(sourceRoot, indices, createDestinationNodeFromSourceNode, addChildToDestinationNode)

Parameters:
    sourceRoot : 'S - The source root tree node.
    indices : IList<int> - List of indices that describes the destination root node. If this parameter is null, an internal list will be created, and the destination root node will get the index 0.
    createDestinationNodeFromSourceNode : Func<'S, IList<int>, 'D> - Function used to create a destination node from a source node. First parameter is the source node, 2nd parameter is a list of indices that describe the destination node.
    addChildToDestinationNode : Action<'D, 'D> - Procedure to add a child node to a destination node (first argument is the parent node, 2nd argument is the child node).

Returns: 'D The root node of the newly created destination tree that reflects the structure of the source tree.

Projects a tree (source tree) to a new tree (destination tree). The creation function for the new tree nodes gets information about the node indices.

sourceRoot : 'S

The source root tree node.

indices : IList<int>

List of indices that describes the destination root node. If this parameter is null, an internal list will be created, and the destination root node will get the index 0.

createDestinationNodeFromSourceNode : Func<'S, IList<int>, 'D>

Function used to create a destination node from a source node. First parameter is the source node, 2nd parameter is a list of indices that describe the destination node.

addChildToDestinationNode : Action<'D, 'D>

Procedure to add a child node to a destination node (first argument is the parent node, 2nd argument is the child node).

Returns: 'D

The root node of the newly created destination tree that reflects the structure of the source tree.

TreeNodeExtensions.ProjectTreeToTree(sourceRoot, destRoot, updateDestinationNodeFromSourceNode)

Full Usage: TreeNodeExtensions.ProjectTreeToTree(sourceRoot, destRoot, updateDestinationNodeFromSourceNode)

Parameters:
    sourceRoot : 'S - The source root node.
    destRoot : 'D - The destination root node.
    updateDestinationNodeFromSourceNode : Action<'S, 'D> - An action that takes a source node and a destination node and updates the destination node according to the contents of the source node.

Projects a source tree onto a destination tree. Nodes are updated, added, or deleted in the destination tree to match the source tree.

sourceRoot : 'S

The source root node.

destRoot : 'D

The destination root node.

updateDestinationNodeFromSourceNode : Action<'S, 'D>

An action that takes a source node and a destination node and updates the destination node according to the contents of the source node.

TreeNodeExtensions.ProjectTreeToTree(sourceRoot, destRoot, updateDestinationNodeFromSourceNode, createDestinationNode)

Full Usage: TreeNodeExtensions.ProjectTreeToTree(sourceRoot, destRoot, updateDestinationNodeFromSourceNode, createDestinationNode)

Parameters:
    sourceRoot : 'S - The source root node.
    destRoot : 'D - The destination root node.
    updateDestinationNodeFromSourceNode : Action<'S, 'D> - An action that takes a source node and a destination node and updates the destination node according to the contents of the source node.
    createDestinationNode : Func<'D, 'D> - A function that takes a parent destination node as argument and creates a new destination node as a child of that parent. The return value is the newly created node.

Projects a source tree onto a destination tree. Nodes are updated, added, or deleted in the destination tree to match the source tree.

sourceRoot : 'S

The source root node.

destRoot : 'D

The destination root node.

updateDestinationNodeFromSourceNode : Action<'S, 'D>

An action that takes a source node and a destination node and updates the destination node according to the contents of the source node.

createDestinationNode : Func<'D, 'D>

A function that takes a parent destination node as argument and creates a new destination node as a child of that parent. The return value is the newly created node.

TreeNodeExtensions.ProjectTreeToTree(sourceRoot, destRoot, updateDestinationNodeFromSourceNode, createDestinationNode, deleteDestinationNode)

Full Usage: TreeNodeExtensions.ProjectTreeToTree(sourceRoot, destRoot, updateDestinationNodeFromSourceNode, createDestinationNode, deleteDestinationNode)

Parameters:
    sourceRoot : 'S - The source root node.
    destRoot : 'D - The destination root node.
    updateDestinationNodeFromSourceNode : Action<'S, 'D> - An action that takes a source node and a destination node and updates the destination node according to the contents of the source node.
    createDestinationNode : Func<'D, 'D> - A function that takes a parent destination node as argument and creates a new destination node as a child of that parent. The return value is the newly created node.
    deleteDestinationNode : Action<'D, 'D, int> - An action that deletes a destination node. First argument is the parent node, the second argument is the destination node to delete, 3rd argument is the index of the child node (as obtained from the order of the child node enumeration).

Projects a source tree onto a destination tree. Nodes are updated, added, or deleted in the destination tree to match the source tree.

sourceRoot : 'S

The source root node.

destRoot : 'D

The destination root node.

updateDestinationNodeFromSourceNode : Action<'S, 'D>

An action that takes a source node and a destination node and updates the destination node according to the contents of the source node.

createDestinationNode : Func<'D, 'D>

A function that takes a parent destination node as argument and creates a new destination node as a child of that parent. The return value is the newly created node.

deleteDestinationNode : Action<'D, 'D, int>

An action that deletes a destination node. First argument is the parent node, the second argument is the destination node to delete, 3rd argument is the index of the child node (as obtained from the order of the child node enumeration).

TreeNodeExtensions.ProjectTreeToTree(sourceRoot, destRoot, updateDestinationNodeFromSourceNode, createDestinationNode, deleteDestinationNode, destNodesToDelete)

Full Usage: TreeNodeExtensions.ProjectTreeToTree(sourceRoot, destRoot, updateDestinationNodeFromSourceNode, createDestinationNode, deleteDestinationNode, destNodesToDelete)

Parameters:
    sourceRoot : 'S - The source root node.
    destRoot : 'D - The destination root node.
    updateDestinationNodeFromSourceNode : Action<'S, 'D> - An action that takes a source node and a destination node and updates the destination node according to the contents of the source node.
    createDestinationNode : Func<'D, 'D> - A function that takes a parent destination node as argument and creates a new destination node as a child of that parent. The return value is the newly created node.
    deleteDestinationNode : Action<'D, 'D, int> - An action that deletes a destination node. First argument is the parent node, the second argument is the destination node to delete, 3rd argument is the index of the child node (as obtained from the order of the child node enumeration).
    destNodesToDelete : byref<List<'D * 'D * int>> - A helper collection to collect destination nodes that have to be deleted.

Projects a source tree onto a destination tree. Nodes are updated, added, or deleted in the destination tree to match the source tree.

sourceRoot : 'S

The source root node.

destRoot : 'D

The destination root node.

updateDestinationNodeFromSourceNode : Action<'S, 'D>

An action that takes a source node and a destination node and updates the destination node according to the contents of the source node.

createDestinationNode : Func<'D, 'D>

A function that takes a parent destination node as argument and creates a new destination node as a child of that parent. The return value is the newly created node.

deleteDestinationNode : Action<'D, 'D, int>

An action that deletes a destination node. First argument is the parent node, the second argument is the destination node to delete, 3rd argument is the index of the child node (as obtained from the order of the child node enumeration).

destNodesToDelete : byref<List<'D * 'D * int>>

A helper collection to collect destination nodes that have to be deleted.

TreeNodeExtensions.ProjectTreeToTree(sourceRootNode, destinationRootNode, getSourceChildEnumerator, getDestinationChildEnumerator, updateDestinationNodeFromSourceNode, createDestinationNode, deleteDestinationNode, destinationNodesToDelete)

Full Usage: TreeNodeExtensions.ProjectTreeToTree(sourceRootNode, destinationRootNode, getSourceChildEnumerator, getDestinationChildEnumerator, updateDestinationNodeFromSourceNode, createDestinationNode, deleteDestinationNode, destinationNodesToDelete)

Parameters:
    sourceRootNode : 'S - The source root node.
    destinationRootNode : 'D - The destination root node.
    getSourceChildEnumerator : Func<'S, IEnumerator<'S>> - A function that takes a source node and returns an enumerator to enumerate the children of that node.
    getDestinationChildEnumerator : Func<'D, IEnumerator<'D>> - A function that takes a destination node and returns an enumerator to enumerate the children of that node.
    updateDestinationNodeFromSourceNode : Action<'S, 'D> - An action that takes a source node and a destination node and updates the destination node according to the contents of the source node.
    createDestinationNode : Func<'D, 'D> - A function that takes a parent destination node as argument and creates a new destination node as a child of that parent. The return value is the newly created node.
    deleteDestinationNode : Action<'D, 'D, int> - An action that deletes a destination node. First argument is the parent node, the second argument is the destination node to delete, 3rd argument is the index of the child node (as obtained from the order of the child node enumeration).
    destinationNodesToDelete : byref<List<'D * 'D * int>> - A helper collection to collect destination nodes that have to be deleted. Initially, may be null.

Projects a source tree onto a destination tree. Nodes are updated, added, or deleted in the destination tree to match the source tree.

sourceRootNode : 'S

The source root node.

destinationRootNode : 'D

The destination root node.

getSourceChildEnumerator : Func<'S, IEnumerator<'S>>

A function that takes a source node and returns an enumerator to enumerate the children of that node.

getDestinationChildEnumerator : Func<'D, IEnumerator<'D>>

A function that takes a destination node and returns an enumerator to enumerate the children of that node.

updateDestinationNodeFromSourceNode : Action<'S, 'D>

An action that takes a source node and a destination node and updates the destination node according to the contents of the source node.

createDestinationNode : Func<'D, 'D>

A function that takes a parent destination node as argument and creates a new destination node as a child of that parent. The return value is the newly created node.

deleteDestinationNode : Action<'D, 'D, int>

An action that deletes a destination node. First argument is the parent node, the second argument is the destination node to delete, 3rd argument is the index of the child node (as obtained from the order of the child node enumeration).

destinationNodesToDelete : byref<List<'D * 'D * int>>

A helper collection to collect destination nodes that have to be deleted. Initially, may be null.

TreeNodeExtensions.Remove(node)

Full Usage: TreeNodeExtensions.Remove(node)

Parameters:
    node : 'T

Returns: bool

Frees this node, i.e. removes the node from it's parent collection.

node : 'T
Returns: bool

TreeNodeExtensions.RootNode(node)

Full Usage: TreeNodeExtensions.RootNode(node)

Parameters:
    node : 'T - The node to start with.

Returns: 'T The root node of the tree to which the given node node belongs.

Gets the root node of a tree to which the given node node belongs.

node : 'T

The node to start with.

Returns: 'T

The root node of the tree to which the given node node belongs.

TreeNodeExtensions.TakeFromFirstLeavesToHere(node)

Full Usage: TreeNodeExtensions.TakeFromFirstLeavesToHere(node)

Parameters:
    node : 'T - The node to start the enumeration with.

Returns: IEnumerable<'T> All tree nodes from the upmost leaf of the tree down to the provided node node.

Enumerates through all tree nodes from the upmost leaf of the tree down to the provided node node. The provided node node is included in the enumeration. Attention: Since the order of the nodes must be reversed, this enumeration is only efficient for ITreeListNode types.

node : 'T

The node to start the enumeration with.

Returns: IEnumerable<'T>

All tree nodes from the upmost leaf of the tree down to the provided node node.

TreeNodeExtensions.TakeFromHereToFirstLeaves(node)

Full Usage: TreeNodeExtensions.TakeFromHereToFirstLeaves(node)

Parameters:
    node : 'T - The node to start the enumeration with.

Returns: IEnumerable<'T> All tree nodes from node up to the leaves of the tree.

Enumerates through all tree nodes from (and including) the provided node node up to the leaves of the tree.

node : 'T

The node to start the enumeration with.

Returns: IEnumerable<'T>

All tree nodes from node up to the leaves of the tree.

TreeNodeExtensions.TakeFromHereToLastLeaves(node)

Full Usage: TreeNodeExtensions.TakeFromHereToLastLeaves(node)

Parameters:
    node : 'T - The node to start the enumeration with.

Returns: IEnumerable<'T> All tree nodes from node up to the leaves of the tree. The downmost leaves will be enumerated first.

Enumerates through all tree nodes from (and including) the provided node node to the leaves of the tree. The downmost leaves will be enumerated first.

node : 'T

The node to start the enumeration with.

Returns: IEnumerable<'T>

All tree nodes from node up to the leaves of the tree. The downmost leaves will be enumerated first.

TreeNodeExtensions.TakeFromLeavesToHere(node)

Full Usage: TreeNodeExtensions.TakeFromLeavesToHere(node)

Parameters:
    node : 'T - The node to start the enumeration with.

Returns: IEnumerable<'T> All tree nodes from the downmost leaf of the tree down to the provided node node.

Enumerates through all tree nodes from the downmost leaf of the tree down to the provided node node. The provided node node is included in the enumeration. Attention: Since the order of the nodes must be reversed, this enumeration is only efficient for ITreeListNode types.

node : 'T

The node to start the enumeration with.

Returns: IEnumerable<'T>

All tree nodes from the downmost leaf of the tree down to the provided node node.