ApiReferenceIndex Pennington.DocSite.Api
Singleton that asks the configured IApiMetadataProvider once and publishes a slug → entry map for the API-reference Razor page and content service.
Properties
Namestring- Name of the registration this index belongs to. Used by the content service to emit routes and cross-references.
Constructors
.ctor
#public ApiReferenceIndex(IApiMetadataProvider provider, string name, ILogger<ApiReferenceIndex> logger);Initializes the index.
Parameters
providerIApiMetadataProvidernamestringloggerILogger<ApiReferenceIndex>
Methods
GetEntriesAsync
#public Task<ImmutableDictionary<string, ApiReferenceEntry>> GetEntriesAsync();Gets the slug → entry map, building it on first access.
Returns
Task<ImmutableDictionary<string, ApiReferenceEntry>>Pennington.DocSite.Api.ApiReferenceIndex
namespace Pennington.DocSite.Api;
/// Singleton that asks the configured IApiMetadataProvider once and publishes a slug → entry map for the API-reference Razor page and content service.
public class ApiReferenceIndex
{
/// Initializes the index.
public ApiReferenceIndex(IApiMetadataProvider provider, string name, ILogger<ApiReferenceIndex> logger);
/// Gets the slug → entry map, building it on first access.
public Task<ImmutableDictionary<string, ApiReferenceEntry>> GetEntriesAsync();
/// Name of the registration this index belongs to. Used by the content service to emit routes and cross-references.
public string Name { get; }
}