DocFormatter.CreateMinifier Method

Namespace
Kampute.DocToolkit.Formatters
Assembly
  • Kampute.DocToolkit.dll

Definition

Creates a TextWriter instance that wraps the specified writer to minimize the content for target format.
public virtual TextWriter CreateMinifier(TextWriter writer)

Parameters

writer TextWriter
The TextWriter to write the minimized content to.

Returns

TextWriter
A TextWriter instance that wraps the specified writer for minimizing the content.

Remarks

The default implementation returns the original writer without any wrapping. A derived class can override this method to wrap the original writer with a new instance that minimizes the content for the target format.

After calling this method, the caller should not write to, close, or dispose the original writer directly to ensure that the minimized content is written correctly.

It is the caller's responsibility to dispose the returned TextWriter instance to release any resources.