Click or drag to resize

TreeTraversalServiceDepthFirstPreOrder(InternalElementType, PredicateInternalElementType) Method

A DepthFirst (Pre-Order) Traversal algorithm, which can be used to traverse an InternalElement tree in pre order via foreach (var item in collection){ ... }. A predicate can be specified to restrict the element selection.

Namespace: Aml.Engine.Services.TreeTraversal
Assembly: Aml.Engine.Services.TreeTraversal (in Aml.Engine.Services.TreeTraversal.dll) Version: 2.0
Syntax
public IEnumerable<InternalElementType> DepthFirstPreOrder(
	InternalElementType root,
	Predicate<InternalElementType> condition = null
)

Parameters

root  InternalElementType
The root defines the InternalElement which is used as the starting point of the traversal.
condition  PredicateInternalElementType  (Optional)
The selection predicate.

Return Value

IEnumerableInternalElementType
ordered enumeration of all InternalElements in the tree in pre order.

Implements

ITreeTraversalServiceDepthFirstPreOrder(InternalElementType, PredicateInternalElementType)
See Also