Class EventSubscription<TEvent>
Represents a subscription to a CarrotMQ event of type TEvent.
public class EventSubscription<TEvent> where TEvent : _IMessage<TEvent, NoResponse>
Type Parameters
TEventThe type of event to subscribe to.
- Inheritance
-
EventSubscription<TEvent>
- Inherited Members
Remarks
You can register this subscription with AddEventSubscription<TEvent>() when configuring the DI.
Constructors
EventSubscription(ILogger<EventSubscription<TEvent>>)
public EventSubscription(ILogger<EventSubscription<TEvent>> logger)
Parameters
loggerILogger<EventSubscription<TEvent>>
Fields
EventReceived
An event handler that is invoked when a CarrotMQ event of type TEvent is received.
public AsyncEventHandler<EventSubscriptionEventArgs<TEvent>>? EventReceived