using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleGetPLCData.CS { public delegate void NetEvent(object sender, NetEventArgs e); /// /// 服务器程序的事件参数,包含了激发该事件的会话对象 /// public class NetEventArgs : EventArgs { #region 字段 /// /// 客户端与服务器之间的会话 /// private Session _client; #endregion #region 构造函数 /// /// 构造函数 /// /// 客户端会话 public NetEventArgs(Session client) { if (null == client) { throw (new ArgumentNullException()); } _client = client; } #endregion #region 属性 /// /// 获得激发该事件的会话对象 /// public Session Client { get { return _client; } } #endregion } }