Publishes multiple events to their subscribers.
Events are published in order, but handlers for each event run in parallel.
The events to publish
Gets the number of subscribers for an event type.
The event class constructor
The number of subscribers
Clears all subscribers for a specific event type.
The event class constructor
Clears all subscribers for all event types.
In-memory event bus implementation.
Provides a simple, synchronous event bus with pub/sub capabilities. Each event type can have multiple subscribers.
Example