public void FullWrite() { Script script = new Script(); AddScript(script); TextWriter stringWriter = new StringWriter(); ScriptWriter scriptWriter = new ScriptWriter(stringWriter); script.Render(scriptWriter); string result = stringWriter.ToString(); Console.WriteLine(result); }