using System.Text; using Team.Communicate.State; namespace Team.Communicate.EventArg { public class ServerEventArgs : System.EventArgs { /// /// 提示信息 /// public readonly string Message; /// /// 客户端状态封装类 /// public TcpClientState State; /// /// 是否已经处理过了 /// public bool IsHandled { get; set; } public ServerEventArgs(string msg) { Message = msg; IsHandled = false; } public ServerEventArgs(TcpClientState state) { State = state; IsHandled = false; Message = Encoding.UTF8.GetString(State.Memory.ToArray()); } public ServerEventArgs(string msg, TcpClientState state) { Message = msg; State = state; IsHandled = false; } } }