コード例 #1
0
ファイル: LcrsTrie.cs プロジェクト: mpvyard/resin
        public IEnumerable <LcrsTrie> AllNodesDepthFirst()
        {
            yield return(this);

            if (LeftChild != null)
            {
                foreach (var node in LeftChild.AllNodesDepthFirst())
                {
                    yield return(node);
                }
            }

            if (RightSibling != null)
            {
                foreach (var node in RightSibling.AllNodesDepthFirst())
                {
                    yield return(node);
                }
            }
        }