DocumentPageRenderer Class

Namespace
Kampute.DocToolkit
Assembly
  • Kampute.DocToolkit.dll

Definition

Renders documentation pages for various code elements.
public abstract class DocumentPageRenderer : IDocumentRenderer
Inheritance
Implements

Remarks

The DocumentPageRenderer class provides a base implementation for rendering documentation pages for various code elements. It standardizes the process of transforming code metadata and documentation content into properly formatted pages, serving as a bridge between raw documentation data and the final output format.

This abstract class implements the Template Method pattern, providing concrete implementations for rendering different types of documentation elements while delegating the actual formatting to derived classes through the abstract Render(TextWriter, PageCategory, IDocumentModel) method. This design allows for multiple output formats (HTML, Markdown, etc.) while maintaining a consistent documentation structure.

The class handles rendering for all standard code elements:
  • Topics and namespaces (general organization)
  • Types including classes, structs, interfaces, enums, and delegates
  • Members including constructors, fields, properties, methods, events, and operators
When implementing a custom renderer, developers only need to override the abstract Render(TextWriter, PageCategory, IDocumentModel) method to define how different page categories should be formatted, while inheriting the standardized rendering flow.

Constructors

DocumentPageRenderer()Initializes a new instance of the DocumentPageRenderer class.

Methods

Render(TextWriter, PageCategory, IDocumentModel)Renders the specified documentation page.
RenderClass(TextWriter, ClassModel, bool)Renders the specified class.
RenderConstructor(TextWriter, ConstructorModel)Renders the specified constructor.
RenderConstructorOverloads(TextWriter, OverloadCollection<ConstructorModel>)Renders the specified constructor overloads.
RenderDelegate(TextWriter, DelegateModel)Renders the specified delegate type.
RenderEnum(TextWriter, EnumModel)Renders the specified enum.
RenderEvent(TextWriter, EventModel)Renders the specified event.
RenderField(TextWriter, FieldModel)Renders the specified field.
RenderInterface(TextWriter, InterfaceModel, bool)Renders the specified interface type
RenderMethod(TextWriter, MethodModel)Renders the specified method.
RenderMethodOverloads(TextWriter, OverloadCollection<MethodModel>)Renders the specified method overloads.
RenderNamespace(TextWriter, NamespaceModel, bool)Renders the specified namespace information.
RenderOperator(TextWriter, OperatorModel)Renders the specified operator.
RenderOperatorOverloads(TextWriter, OverloadCollection<OperatorModel>)Renders the specified operator methods.
RenderProperty(TextWriter, PropertyModel)Renders the specified property.
RenderPropertyOverloads(TextWriter, OverloadCollection<PropertyModel>)Renders the specified property overloads.
RenderStruct(TextWriter, StructModel, bool)Renders the specified struct.
RenderTopic(TextWriter, TopicModel)Renders the specified topic.

See Also