This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

ApiReferenceServiceExtensions Pennington.DocSite.Api

DI extension methods for registering the API reference package.

Methods

AddApiReference

#
public static IServiceCollection AddApiReference(IServiceCollection services, string name = "default", Action<ApiReferenceRegistrationOptions> configure = null)

Registers one named API-reference tree. Call once per library you want to document. Each call pairs with a matching AddApiMetadataFrom*(name, …) provider registration and publishes its type pages at the configured RoutePrefix.

Parameters

services IServiceCollection
Service collection.
name string
Registration name. Must match the name used in the provider extension. Defaults to "default".
configure Action<ApiReferenceRegistrationOptions>
Optional options configuration; leave null to take all defaults (/reference/api/ prefix).

Returns

IServiceCollection

Pennington.DocSite.Api.ApiReferenceServiceExtensions

namespace Pennington.DocSite.Api;

/// DI extension methods for registering the API reference package.
public class ApiReferenceServiceExtensions
{
    /// Registers one named API-reference tree. Call once per library you want to document. Each call pairs with a matching AddApiMetadataFrom*(name, …) provider registration and publishes its type pages at the configured RoutePrefix.
    
public static IServiceCollection AddApiReference(IServiceCollection services, string name = "default", Action<ApiReferenceRegistrationOptions> configure = null)
; }