using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DistributedGA.Core.Domain { //containts contact information of one peer public class PeerInfo { public int Port { get; set; } public string IpAddress { get; set; } public string ProblemInstance { get; set; } public override bool Equals(System.Object obj) { if (obj == null) { return false; } PeerInfo p = obj as PeerInfo; if ((System.Object)p == null) { return false; } return p.Port.Equals(this.Port) && p.IpAddress.Equals(this.IpAddress); } public override int GetHashCode() { return this.IpAddress.GetHashCode(); } } }