Table of Contents

Class EventSubscription<TEvent>

Namespace
CarrotMQ.Core.Handlers
Assembly
CarrotMQ.Core.dll

Represents a subscription to a CarrotMQ event of type TEvent.

public class EventSubscription<TEvent> where TEvent : _IMessage<TEvent, NoResponse>

Type Parameters

TEvent

The 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

logger ILogger<EventSubscription<TEvent>>

Fields

EventReceived

An event handler that is invoked when a CarrotMQ event of type TEvent is received.

public AsyncEventHandler<EventSubscriptionEventArgs<TEvent>>? EventReceived

Field Value

AsyncEventHandler<EventSubscriptionEventArgs<TEvent>>