public string FormatSQLTree(Node sqlTreeDoc)
        {
            //thread-safe - each call to FormatSQLTree() gets its own independent state object
            TSqlObfuscatingFormattingState state = new TSqlObfuscatingFormattingState(RandomizeColor, RandomizeLineLength);

            if (sqlTreeDoc.Name == SqlStructureConstants.ENAME_SQL_ROOT && sqlTreeDoc.GetAttributeValue(SqlStructureConstants.ANAME_ERRORFOUND) == "1")
            {
                state.AddOutputContent(ErrorOutputPrefix);
            }

            //pass "doc" itself into process: useful/necessary when formatting MINIFY sub-regions from standard formatter
            ProcessSqlNodeList(new[] { sqlTreeDoc }, state);
            state.BreakIfExpected();
            return(state.DumpOutput());
        }
 private string FormatSQLNodes(XmlNodeList nodes, TSqlObfuscatingFormattingState state)
 {
     ProcessSqlNodeList(nodes, state);
     state.BreakIfExpected();
     return(state.DumpOutput());
 }
 private string FormatSQLNodes(XmlNodeList nodes, TSqlObfuscatingFormattingState state)
 {
     ProcessSqlNodeList(nodes, state);
     state.BreakIfExpected();
     return state.DumpOutput();
 }