Table of Contents

Interface IEvent<TEvent, TExchangeEndPoint>

Namespace
CarrotMQ.Core.Dto
Assembly
CarrotMQ.Core.dll

Represents an event interface that defines the contract for handling a specific event sent over an exchange endpoint.

public interface IEvent<TEvent, TExchangeEndPoint> : _IEvent<TEvent>, _IMessage<TEvent, NoResponse, TExchangeEndPoint>, _IMessage<TEvent, NoResponse> where TEvent : IEvent<TEvent, TExchangeEndPoint> where TExchangeEndPoint : ExchangeEndPoint, new()

Type Parameters

TEvent

The type of the event.

TExchangeEndPoint

The type of the messaging exchange endpoint associated with the event (should inherit from ExchangeEndPoint)

Examples

Example of an event definition:

public class MyEvent : IEvent<MyEvent, MyExchangeEndPoint>
{
    public MyEvent(string eventData)
    {
        EventData = eventData;
    }

    public string EventData { get; set; }
}