ITraversal<TNode>.Enumerate Method
Definition
Enumerates over a node and its descendents.
public abstract IEnumerable<TNode> Enumerate(TNode root, bool includeRoot = true, Func<TNode, bool>? shouldEnumerateDescendents = null);
Parameters
Name | Type | Description |
---|---|---|
root | TNode | The root node to enumerate over. |
includeRoot | Whether to include | |
shouldEnumerateDescendents | Optional function to specify whether the descendents of a given node should be included or not. If not provided then all descendents will be included. |
Returns
A lazy IEnumerable<T> of the descendents.
Last modified: 09 November 2024