コード例 #1
0
        public string OutputNode(ProjectDom dom, INode node, string indent)
        {
            CSharpOutputVisitor outputVisitor = new CSharpOutputVisitor();

            CSharpFormatter.SetFormatOptions(outputVisitor, dom != null && dom.Project != null ? dom.Project.Policies : null);
            int col = CSharpFormatter.GetColumn(indent, 0, 4);

            outputVisitor.OutputFormatter.IndentationLevel = System.Math.Max(0, col / 4);
            node.AcceptVisitor(outputVisitor, null);
            return(outputVisitor.Text);
        }