Table of Contents

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

inner TextWriter

the inner text writer

indentString string

the 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

text string

the unformatted text

WriteText(char)

Writes the given text to the inner text writer

protected virtual void WriteText(char token)

Parameters

token char

the token to write

WriteText(string)

Writes the given text to the inner text writer

protected virtual void WriteText(string token)

Parameters

token string

the token to write

WriteToken(string, bool)

Writes the given token to the underlying writer

public void WriteToken(string token, bool appendSpace)

Parameters

token string

the token that should be written

appendSpace bool

true, if a space should be appended when necessary