IDocumentWriterFactory Interface

Namespace
Kampute.DocToolkit
Assembly
  • Kampute.DocToolkit.dll

Definition

Defines a contract for creating TextWriter instances to write content of a specific documentation element.
public interface IDocumentWriterFactory
Implemented by

Remarks

The IDocumentWriterFactory interface provides an abstraction for creating rendering contexts that are used throughout the documentation generation process. The factory pattern used here allows the documentation system to create appropriate TextWriter instances for different types of content while ensuring consistent handling of resources and proper disposal. This separation of concerns enables consumers to focus on writing documentation content without needing to manage the details of file paths, URL resolution, or resource cleanup.

Implementations of this interface are responsible for determining:

  • Where documentation content will be written (file system, memory, etc.)
  • How to scope URLs for cross-reference links in the documentation content
  • Any additional processing that should be applied before or after rendering

Methods

CreateWriter(IDocumentModel)Creates a TextWriter instance for rendering documentation content of the specified document model.