This site provides a machine-readable index at /llms.txt.

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(
    this 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 (optional)
Registration name. Must match the name used in the provider extension. Defaults to "default".
configure Action<ApiReferenceRegistrationOptions>? (optional)
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(
    this IServiceCollection services,
    string name = "default",
    Action<ApiReferenceRegistrationOptions>? configure = null);
}