public override bool Equals(Object obj) { //Check for null and compare run-time types. if ((obj == null) || !this.GetType().Equals(obj.GetType())) { return(false); } else { Puppet s = (Puppet)obj; return(s.serverId == this.serverId); } }
private void Crash(string serverId) { try { safeSleep(); Puppet p = new Puppet(serverId, null); RemoteAsyncDelegate remDelegate = new RemoteAsyncDelegate(Servers[p].Crash); remDelegate.BeginInvoke(null, null); Servers.Remove(p); } catch (SocketException) { System.Console.WriteLine("Could not locate server"); } }