IEventSubscriptions
Interface in Oadm.Sdk.Events · Oadm.Sdk.dll
Lets a core plugin receive every event published to the server, the same ones the event rules see (ICorePluginContext.EventSubscriptions). A subscription starts with every stateful event that is on now (PublishedEvent.FromSnapshot), then gets each event as it is published. The server never waits for a subscriber: each subscription has its own queue of 10,000 events, and when the handler cannot keep up the oldest are dropped (logged). The handler runs on the subscription’s own loop, one event at a time; an exception is logged and the subscription goes on. Subscriptions end when they are disposed or when the plugin stops.
public interface IEventSubscriptionsProperties
Section titled “Properties”IReadOnlyList<SubscribedEventType> Types { get; }Default implementation
Every event type the server knows now (OADM’s own first, then the plugins’); empty on an older host.
Methods
Section titled “Methods”Subscribe
Section titled “Subscribe”IDisposable Subscribe(Action<PublishedEvent> handler)Starts a subscription; dispose the result to end it.
Events
Section titled “Events”TypesChanged
Section titled “TypesChanged”event EventHandler? TypesChangedDefault implementation
Raised when IEventSubscriptions.Types changed: a source changed its types, or a plugin was turned on or off.