Class BowireMockHandleRegistry
- Namespace
- Kuestenlogik.Bowire.Mcp
- Assembly
- Kuestenlogik.Bowire.Mcp.dll
In-memory registry of MockServer instances spawned by
bowire.mock.start. The MCP host is the owner — handles live
for the duration of the host process. bowire.mock.stop looks
up and disposes; bowire.mock.list enumerates.
Registered as a singleton in AddBowireMcp(IServiceCollection, Action<BowireMcpOptions>?) so the dictionary is shared across the tool class's lifetime.
public sealed class BowireMockHandleRegistry : IAsyncDisposable
- Inheritance
-
BowireMockHandleRegistry
- Implements
- Inherited Members
Constructors
BowireMockHandleRegistry()
public BowireMockHandleRegistry()
Methods
DisposeAsync()
public ValueTask DisposeAsync()
Returns
Register(MockServer)
public string Register(MockServer server)
Parameters
serverMockServer
Returns
RemoveAndDisposeAsync(string)
public Task<bool> RemoveAndDisposeAsync(string handle)
Parameters
handlestring
Returns
Snapshot()
public IReadOnlyDictionary<string, MockServer> Snapshot()
Returns
TryGet(string, out MockServer?)
public bool TryGet(string handle, out MockServer? server)
Parameters
handlestringserverMockServer