IDocumentationContext Interface

Namespace
Kampute.DocToolkit
Assembly
  • Kampute.DocToolkit.dll

Definition

Defines a contract for providing the context for the documentation generation process.
public interface IDocumentationContext : IDisposable
Extends
Implemented by

Remarks

The IDocumentationContext interface represents the central hub of the documentation generation system, binding together all the necessary components for creating complete API documentation. It serves as a repository of information about the assemblies, types, and members being documented, while also providing access to formatting, addressing, and content extraction services.

A documentation context typically contains:
  • The assemblies being documented and their contained types and members
  • The topics that provide narrative content for the documentation
  • The strategy for organizing documentation pages
  • The formatter for transforming XML documentation comments into readable content
  • The content provider for extracting XML documentation comments from code elements
  • The address provider for resolving URLs and file paths for documentation elements
  • The URL translator provider for replacing URLs in documentation content, particularly for cross-references in topics
Documentation generators use this context to access all the information needed to create a complete set of documentation pages, ensuring consistency across the entire documentation set. Extensions can be built on top of this interface to provide specialized functionality like documentation validation, search index generation, or cross-reference resolution.

Properties

AddressProviderGets the provider responsible for resolving documentation URLs and file paths of elements.
AssembliesGets the assemblies for which documentation will be generated.
ContentFormatterGets the object responsible for formatting the documentation content.
ContentProviderGets the provider responsible for finding documentation content of elements.
LanguageGets the programming language of the codebase being documented.
NamespacesGets all namespaces in the assemblies being documented.
TopicsGets all top-level topics in the documentation.
TypesGets all exported types in the assemblies being documented.
UrlTransformerGets the object responsible for transforming non-API site-root-relative URLs to an absolute or document-relative URL.

Extension Methods

DetermineNameQualifier(this IDocumentationContext, IMember)Determines the most suitable name qualifier for displaying the specified member in the context of the current documentation scope.
FindMember(this IDocumentationContext, IMember)Finds the model corresponding to the specified reflection metadata within the documentation context.
InspectDocumentations(this IDocumentationContext, XmlDocInspectionOptions)Inspects the documentation of members in the context for missing or incomplete elements.
IsFormatSupported(this IDocumentationContext, string)Determines whether the specified file format (based on the file extension) is supported by the content formatter of the documentation context.
TryTransformText(this IDocumentationContext, string, string, out string)Attempts to transform the specified text using the appropriate text transformer based on the file extension.