public IEnumerable <CommandNode> WalkTree(CommandNode root = null) { foreach (var node in root?.GetChildren() ?? _root.Values) { yield return(node); foreach (var child in WalkTree(node)) { yield return(child); } } }