 | TreeTraversalServiceBreathFirst(InstanceHierarchyType, PredicateInternalElementType) Method |
A BreathFirst Traversal algorithm, which can be used to traverse an InstanceHierarchy tree
via foreach (var item in collection){ ... }. A predicate can be specified to restrict the element selection.
Namespace: Aml.Engine.Services.TreeTraversalAssembly: Aml.Engine.Services.TreeTraversal (in Aml.Engine.Services.TreeTraversal.dll) Version: 2.0
Syntaxpublic IEnumerable<Tuple<int, IInternalElementContainer>> BreathFirst(
InstanceHierarchyType root,
Predicate<InternalElementType> condition = null
)
Public Function BreathFirst (
root As InstanceHierarchyType,
Optional condition As Predicate(Of InternalElementType) = Nothing
) As IEnumerable(Of Tuple(Of Integer, IInternalElementContainer))
public:
virtual IEnumerable<Tuple<int, IInternalElementContainer^>^>^ BreathFirst(
InstanceHierarchyType^ root,
Predicate<InternalElementType^>^ condition = nullptr
) sealed
Parameters
- root InstanceHierarchyType
- The root defines the InstanceHierarchy which is used as the starting point of the traversal.
- condition PredicateInternalElementType (Optional)
- The selection predicate.
Return Value
IEnumerableTupleInt32,
IInternalElementContainerorderedeEnumeration of all InternalElements in the tree.
Implements
ITreeTraversalServiceBreathFirst(InstanceHierarchyType, PredicateInternalElementType)
See Also