CompiledAssemblyApiMetadataExtensions
Pennington.ApiMetadata.Reflection
DI extension that registers a reflection-backed IApiMetadataProvider.
Methods
AddApiMetadataFromCompiledAssembly
#public static IServiceCollection AddApiMetadataFromCompiledAssembly(IServiceCollection services, string name, Action<CompiledAssemblyApiOptions> configure)
Registers CompiledAssemblyApiMetadataProvider as a keyed IApiMetadataProvider under name. Call once per library you want to document — each call builds its own MetadataLoadContext and xmldoc index scoped to the supplied AssemblyDirectories. The shared IXmlDocParser / IXmlDocHtmlRenderer services are registered once (idempotent).
Parameters
servicesIServiceCollection- Service collection.
namestring- Registration name. Pair with the matching
AddApiReference(name, …)call. Defaults to"default". configureAction<CompiledAssemblyApiOptions>- Required configuration — at minimum add one entry to
AssemblyDirectories.
Returns
IServiceCollectionAddApiMetadataFromCompiledAssembly
#public static IServiceCollection AddApiMetadataFromCompiledAssembly(IServiceCollection services, Action<CompiledAssemblyApiOptions> configure)
Convenience overload: registers under the "default" name for sites documenting a single library.
Parameters
servicesIServiceCollectionconfigureAction<CompiledAssemblyApiOptions>
Returns
IServiceCollectionPennington.ApiMetadata.Reflection.CompiledAssemblyApiMetadataExtensions
namespace Pennington.ApiMetadata.Reflection;
/// DI extension that registers a reflection-backed IApiMetadataProvider.
public class CompiledAssemblyApiMetadataExtensions
{
/// Registers CompiledAssemblyApiMetadataProvider as a keyed IApiMetadataProvider under name. Call once per library you want to document — each call builds its own MetadataLoadContext and xmldoc index scoped to the supplied AssemblyDirectories. The shared IXmlDocParser / IXmlDocHtmlRenderer services are registered once (idempotent).
public static IServiceCollection AddApiMetadataFromCompiledAssembly(IServiceCollection services, string name, Action<CompiledAssemblyApiOptions> configure)
;
/// Convenience overload: registers under the "default" name for sites documenting a single library.
public static IServiceCollection AddApiMetadataFromCompiledAssembly(IServiceCollection services, Action<CompiledAssemblyApiOptions> configure)
;
}