Beispiel #1
0
        String OutputGraph(TraverseFunc traverseFunc, SymbolContext <SymbolT, CtxKey> ctx,
                           int depth, int maxh, bool symbs)
        {
            string text = (symbs ? ctx.ListContext() : ctx.ToString());

            text = String.Concat(Enumerable.Repeat("  ", depth)) + text + Environment.NewLine;
            if (maxh > 0)
            {
                foreach (var p in traverseFunc(ctx))
                {
                    text += OutputGraph(traverseFunc, p, depth + 1, maxh - 1, symbs);
                }
            }
            return(text);
        }