DocumentationContext Class

Namespace
Kampute.DocToolkit
Assembly
  • Kampute.DocToolkit.dll

Definition

Provides the context for generating documentation.
public class DocumentationContext : IDocumentationContext
Inheritance
Implements

Remarks

The DocumentationContext class serves as the central repository for all information needed to generate API documentation. It implements the IDocumentationContext interface to provide a unified way to access assemblies, their types and members, formatted documentation content, and documentation addressing schemes.

This class combines several key components of the documentation system:
  • Assembly and type metadata through managed assemblies
  • XML documentation content from compiler-generated XML files
  • Formatting services for transforming XML content into readable formats (e.g. HTML, Markdown, etc.)
  • Addressing strategies for organizing documentation into files and URLs
  • External reference resolvers for linking to third-party documentation
  • Programming language services for syntax-specific formatting
  • Topic management for narrative content in the documentation

Constructors

DocumentationContext(IProgrammingLanguage, IDocumentAddressProvider, IXmlDocProvider, IDocumentFormatter, IEnumerable<IAssembly>, IEnumerable<ITopic>, object)Initializes a new instance of the DocumentationContext class.

Properties

AddressProviderGets the provider responsible for resolving documentation URLs and file paths of elements.
AssembliesGets the assemblies to generate documentation for.
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.
MetadataGets the metadata associated with the documentation context.
NamespacesGets all namespaces in the assemblies being documented.
TopicsGets the topics in the documentation context.
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.

Methods

Dispose()Disposes of the resources used by the DocumentationContext class.
Dispose(bool)Disposes of the resources used by the DocumentationContext class.
ToScopedTopic(ITopic)Creates a contextual reference to the specified topic.

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.