コード例 #1
0
ファイル: CommandTree.cs プロジェクト: susu/Torch
        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);
                }
            }
        }