MarkdownWriter Constructor

Namespace
Kampute.DocToolkit.IO.Writers
Assembly
  • Kampute.DocToolkit.dll

Definition

Initializes a new instance of the MarkdownWriter class.
public MarkdownWriter(TextWriter writer, bool leaveOpen = false)

Parameters

writer TextWriter
The TextWriter to write the Markdown content to.
leaveOpen bool optional
A value indicating whether the underlying writer should be left open when the MarkdownWriter is disposed.

Exceptions

ArgumentNullException
Thrown when writer is null.

Remarks

If leaveOpen is true, the underlying TextWriter remains open after the MarkdownWriter is disposed. This is useful when managing the writer externally.
To improve readability and visual appeal of Markdown, consider using an instance of MarkdownMinifier as the writer.