1
0
mirror of synced 2024-11-14 17:33:49 +00:00
PettingZoo/Connection/IConnection.cs
PsychoMark ccfde19d2d Changed Model namespace to Connection, moved bits out to Infrastructure
Added Mock connection
Fixed AutoScroll failing with high rate message flow
2016-07-12 16:57:24 +02:00

47 lines
967 B
C#

using System;
namespace PettingZoo.Connection
{
public enum ConnectionStatus
{
Disconnected,
Connecting,
Connected,
Error
}
public class StatusChangedEventArgs : EventArgs
{
public ConnectionStatus Status { get; private set; }
public string Context { get; private set; }
public StatusChangedEventArgs(ConnectionStatus status, string context)
{
Status = status;
Context = context;
}
}
public class MessageReceivedEventArgs : EventArgs
{
public MessageInfo MessageInfo { get; private set; }
public MessageReceivedEventArgs(MessageInfo messageInfo)
{
MessageInfo = messageInfo;
}
}
public interface IConnection : IDisposable
{
event EventHandler<StatusChangedEventArgs> StatusChanged;
event EventHandler<MessageReceivedEventArgs> MessageReceived;
}
}