public void Traversal(CRTreeTraversalIndentationDelegate treeNodeTraversal, CRTreeAddConditionDelegate treeNodeAddCondition, CRTreeDescendConditionDelegate treeNodeDescendCondition, int indentation) { if (treeNodeAddCondition(this)) { treeNodeTraversal(this, indentation); if (treeNodeDescendCondition(this)) { for (int i = 0; i < ChildCount; ++i) { CRTreeNode childNode = Children[i]; if (childNode != null) { childNode.Traversal(treeNodeTraversal, treeNodeAddCondition, treeNodeDescendCondition, indentation + 1); } } } } }