1
0
mirror of synced 2024-11-15 01:33:51 +00:00
PettingZoo/PettingZoo.Core/Connection/ISubscriber.cs

27 lines
551 B
C#

using System;
namespace PettingZoo.Core.Connection
{
public interface ISubscriber : IAsyncDisposable
{
string Exchange {get; }
string RoutingKey { get; }
event EventHandler<MessageReceivedEventArgs>? MessageReceived;
void Start();
}
public class MessageReceivedEventArgs : EventArgs
{
public ReceivedMessageInfo MessageInfo { get; }
public MessageReceivedEventArgs(ReceivedMessageInfo messageInfo)
{
MessageInfo = messageInfo;
}
}
}