private void AddSlave(TcpClient slave) { var slaveAddress = ((IPEndPoint)slave.Client.RemoteEndPoint).Address; var slavePort = ((IPEndPoint)slave.Client.RemoteEndPoint).Port; var slaveRecord = new Slave(slaveAddress, slavePort, slave); _slaves.Add(slaveRecord); if (SlaveAdded != null) { SlaveAdded(this, new SlaveListEventArgs(slaveRecord)); } }
private void AddSlave(TcpClient slave) { var slaveAddress = ((IPEndPoint) slave.Client.RemoteEndPoint).Address; var slavePort = ((IPEndPoint) slave.Client.RemoteEndPoint).Port; var slaveRecord = new Slave(slaveAddress, slavePort, slave); _slaves.Add(slaveRecord); if (SlaveAdded != null) SlaveAdded(this, new SlaveListEventArgs(slaveRecord)); }
public SlaveListEventArgs(Slave slave) : base() { Slave = slave; }