public string ToText(ScriptPrinterOptions options = default(ScriptPrinterOptions)) { CheckErrors(); var writer = new TextWriterOutput(); var renderContext = new ScriptPrinter(writer, options); renderContext.Write(Page); return(writer.ToString()); }
/// <summary> /// Converts back this template to a textual representation. This is the inverse of <see cref="Parse"/>. /// </summary> /// <param name="options">The rendering options</param> /// <returns>The template converted back to a textual representation of the template</returns> public string ToText(TemplateRewriterOptions options = default(TemplateRewriterOptions)) { CheckErrors(); TextWriterOutput writer = new TextWriterOutput(); TemplateRewriterContext renderContext = new TemplateRewriterContext(writer, options); renderContext.Write(Page); return(writer.ToString()); }