Class BowireMockManagementServiceCollectionExtensions
- Namespace
- Kuestenlogik.Bowire.Mock.Management
- Assembly
- Kuestenlogik.Bowire.Mock.dll
DI helpers for the mock-management surface introduced in #56. Pair with MapBowireMockManagement(IEndpointRouteBuilder, string) at host wire-in time.
public static class BowireMockManagementServiceCollectionExtensions
- Inheritance
-
BowireMockManagementServiceCollectionExtensions
- Inherited Members
Methods
AddBowireMockManagement(IServiceCollection)
Register the BowireMockHostManager singleton so
the endpoints + future MCP tools can resolve it. Single owner
of mock-server lifecycle after the #223 consolidation —
MockRegistry + the parallel /api/mock/* surface are
gone. Idempotent — re-calling is a no-op.
public static IServiceCollection AddBowireMockManagement(this IServiceCollection services)
Parameters
servicesIServiceCollection
Returns
AddBowireMockManagement(IServiceCollection, IReadOnlyList<IBowireMockSchemaSource>, IReadOnlyList<IBowireMockLiveSchemaHandler>, IReadOnlyList<IBowireMockHostingExtension>)
#560: register the manager wired with plugin-contributed schema sources, so the workbench's Mocks rail can start an OpenAPI / protobuf / GraphQL schema mock (not just recording-driven mocks). The caller enumerates the sources from its plugin loader (the standalone host does this at startup). Idempotent-friendly: the last registration wins, so call this instead of the no-arg overload.
public static IServiceCollection AddBowireMockManagement(this IServiceCollection services, IReadOnlyList<IBowireMockSchemaSource> schemaSources, IReadOnlyList<IBowireMockLiveSchemaHandler> liveSchemaHandlers, IReadOnlyList<IBowireMockHostingExtension> hostingExtensions)
Parameters
servicesIServiceCollectionschemaSourcesIReadOnlyList<IBowireMockSchemaSource>liveSchemaHandlersIReadOnlyList<IBowireMockLiveSchemaHandler>hostingExtensionsIReadOnlyList<IBowireMockHostingExtension>