Skip to content

Interface IErasedPluginEventAdapter

Namespace: DotBoxD.Plugins.Runtime
Assembly: DotBoxD.Plugins.dll

A type-erased, wire-capable view of a registered DotBoxD.Abstractions.IPluginEventAdapter. The closure is captured once at registration time (when the event type is statically known), so the host-side router (DotBoxD.Plugins.PluginServer.WireHook(DotBoxD.Plugins.Kernel.InstalledKernel,DotBoxD.Plugins.WireOptions) / DotBoxD.Plugins.PluginServer.WireSubscription(DotBoxD.Plugins.Kernel.InstalledKernel,DotBoxD.Plugins.WireOptions)) can wire an installed kernel to the correct typed pipeline terminal by event name — with no reflection at wire time.

Public as a composability seam: resolve one via `DotBoxD.Plugins.Runtime.PluginEventAdapterRegistry.TryResolveErased(System.String,DotBoxD.Plugins.Runtime.IErasedPluginEventAdapter@)` and wire a kernel your own way when the `DotBoxD.Plugins.PluginServer.WireHook(DotBoxD.Plugins.Kernel.InstalledKernel,DotBoxD.Plugins.WireOptions)` / `DotBoxD.Plugins.PluginServer.WireSubscription(DotBoxD.Plugins.Kernel.InstalledKernel,DotBoxD.Plugins.WireOptions)` defaults don't fit — without dropping all the way back to a hand-written event-name → typed-On<TEvent>() dispatch.

public interface IErasedPluginEventAdapter

The adapter’s event name (the [Hook] name or the type name), used for by-name resolution.

string EventName { get; }

string

The CLR event type this adapter handles.

Type EventType { get; }

Type

The result type declared by the event’s [Hook] attribute, or null when it declares none.

Type? HookResultType { get; }

Type?

WireHook(HookRegistry, InstalledKernel, KernelWireTerminal, WireCallbacks)

Section titled “ WireHook(HookRegistry, InstalledKernel, KernelWireTerminal, WireCallbacks)”

Wires kernel into the hook pipeline for this event using the classified terminal.

void WireHook(HookRegistry hooks, InstalledKernel kernel, KernelWireTerminal terminal, WireCallbacks callbacks)

hooks HookRegistry

kernel InstalledKernel

terminal KernelWireTerminal

callbacks WireCallbacks

WireSubscription(SubscriptionRegistry, InstalledKernel, KernelWireTerminal, WireCallbacks, EventIndexRegistry?)

Section titled “ WireSubscription(SubscriptionRegistry, InstalledKernel, KernelWireTerminal, WireCallbacks, EventIndexRegistry?)”

Wires kernel into the subscription pipeline for this event. A plain terminal is routed through indexRegistry first when one is supplied and the subscription carries index metadata; otherwise it falls back to the broad pipeline. A projecting terminal pushes to the plugin’s native delegate; result terminals are rejected (subscriptions have no result channel).

void WireSubscription(SubscriptionRegistry subscriptions, InstalledKernel kernel, KernelWireTerminal terminal, WireCallbacks callbacks, EventIndexRegistry? indexRegistry)

subscriptions SubscriptionRegistry

kernel InstalledKernel

terminal KernelWireTerminal

callbacks WireCallbacks

indexRegistry EventIndexRegistry?