Class BowireProtocolRegistry
- Namespace
- Kuestenlogik.Bowire
- Assembly
- Kuestenlogik.Bowire.dll
Registry of discovered protocol plugins. Scans loaded assemblies for IBowireProtocol implementations.
public sealed class BowireProtocolRegistry
- Inheritance
-
BowireProtocolRegistry
- Inherited Members
Constructors
BowireProtocolRegistry()
public BowireProtocolRegistry()
Properties
Protocols
public IReadOnlyList<IBowireProtocol> Protocols { get; }
Property Value
Methods
Discover(ILogger?)
Auto-discover protocol plugins from loaded assemblies. Pass an ILogger to surface load failures (a buggy plugin DLL or a missing dependency would otherwise vanish silently into the catch block, leaving the user wondering why their plugin doesn't show up).
public static BowireProtocolRegistry Discover(ILogger? logger = null)
Parameters
loggerILogger
Returns
Discover(IEnumerable<string>?, ILogger?)
Same as Discover(ILogger?) but also accepts a list
of plugin ids to skip during the scan. Used for the
--disable-plugin CLI flag and the
Bowire:DisabledPlugins appsettings option — handy when a
plugin's load path is broken or its discovery probe is too
expensive for the current host's network.
public static BowireProtocolRegistry Discover(IEnumerable<string>? disabledPluginIds, ILogger? logger = null)
Parameters
disabledPluginIdsIEnumerable<string>Plugin ids to exclude. Matched case-insensitively against Id.
nullor empty means "scan everything", same as the parameterless overload.loggerILoggerOptional warning logger.
Returns
FindHttpInvoker()
Returns the first registered protocol that also implements IInlineHttpInvoker, or null when no such plugin is loaded. Used by the /api/invoke endpoint's transcoded HTTP path so it can dispatch over HTTP without core having any HTTP-invocation code or dependencies of its own — the REST plugin owns it.
public IInlineHttpInvoker? FindHttpInvoker()
Returns
FindSseSubscriber()
Returns the first registered protocol that also implements IInlineSseSubscriber, or null when no such plugin is loaded. Used by plugins that want to consume an SSE stream without taking a hard compile-time dependency on the SSE plugin (the MCP plugin uses this for server-sent notifications, the GraphQL plugin uses it for graphql-sse subscriptions).
public IInlineSseSubscriber? FindSseSubscriber()
Returns
FindWebSocketChannel()
Returns the first registered protocol that also implements IInlineWebSocketChannel, or null when no such plugin is loaded. Used by plugins that want to open a raw WebSocket channel (with optional sub-protocols and request headers) without taking a hard compile-time dependency on the WebSocket plugin. The GraphQL plugin uses this for graphql-transport-ws subscriptions.
public IInlineWebSocketChannel? FindWebSocketChannel()
Returns
GetById(string)
public IBowireProtocol? GetById(string id)
Parameters
idstring
Returns
Register(IBowireProtocol)
public void Register(IBowireProtocol protocol)
Parameters
protocolIBowireProtocol