Class PrettyPrintWriter
- Namespace
- NMF.AnyText.PrettyPrinting
- Assembly
- NMF.AnyText.Core.dll
Denotes a helper class to pretty-print texts
public class PrettyPrintWriter
- Inheritance
-
PrettyPrintWriter
- Inherited Members
Constructors
PrettyPrintWriter(TextWriter, string)
Creates a new instance
public PrettyPrintWriter(TextWriter inner, string indentString)
Parameters
innerTextWriterthe inner text writer
indentStringstringthe indentation string
Methods
Indent()
Increase the indentation level
public void Indent()
SupressSpace()
Supresses rendering a space character before the next token
public void SupressSpace()
Unindent()
Decrease the indentation level
public void Unindent()
WriteLine()
Writes a new line to the inner text writer
protected virtual void WriteLine()
WriteNewLine()
Writes a newline to the underlying writer
public void WriteNewLine()
WriteRaw(string)
Writes raw (unformatted) text
public void WriteRaw(string text)
Parameters
textstringthe unformatted text
WriteText(char)
Writes the given text to the inner text writer
protected virtual void WriteText(char token)
Parameters
tokencharthe token to write
WriteText(string)
Writes the given text to the inner text writer
protected virtual void WriteText(string token)
Parameters
tokenstringthe token to write
WriteToken(string, bool)
Writes the given token to the underlying writer
public void WriteToken(string token, bool appendSpace)