- Timestamp:
- 06/19/16 23:32:37 (8 years ago)
- Location:
- branches/thasling/DistributedGA/DistributedGA.Core/Domain
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/thasling/DistributedGA/DistributedGA.Core/Domain/MessageRecieveEventArgs.cs
r13887 r13924 1 1 using System; 2 2 3 namespace DistributedGA.Core.Domain 4 { 5 public class MessageRecieveEventArgs : EventArgs 6 { 7 public int val; 8 public byte[][] data { get; set; } 9 public PeerInfo Sender { get; set; } 10 } 3 namespace DistributedGA.Core.Domain { 4 public class MessageRecieveEventArgs : EventArgs { 5 public int val; 6 public byte[][] data { get; set; } 7 public PeerInfo Sender { get; set; } 8 } 11 9 } -
branches/thasling/DistributedGA/DistributedGA.Core/Domain/PeerInfo.cs
r13524 r13924 5 5 using System.Threading.Tasks; 6 6 7 namespace DistributedGA.Core.Domain 8 { 9 //containts contact information of one peer 10 public class PeerInfo 11 { 12 public int Port { get; set; } 13 public string IpAddress { get; set; } 14 public string ProblemInstance { get; set; } 7 namespace DistributedGA.Core.Domain { 8 //containts contact information of one peer 9 public class PeerInfo { 10 public int Port { get; set; } 11 public string IpAddress { get; set; } 12 public string ProblemInstance { get; set; } 15 13 16 public override bool Equals(System.Object obj) 17 { 18 if (obj == null) 19 { 20 return false; 21 } 14 public override bool Equals(System.Object obj) { 15 if (obj == null) { 16 return false; 17 } 22 18 23 PeerInfo p = obj as PeerInfo; 24 if ((System.Object)p == null) 25 { 26 return false; 27 } 19 PeerInfo p = obj as PeerInfo; 20 if ((System.Object)p == null) { 21 return false; 22 } 28 23 29 return p.Port.Equals(this.Port) && p.IpAddress.Equals(this.IpAddress); 30 } 31 public override int GetHashCode() 32 { 33 return this.IpAddress.GetHashCode(); 34 } 24 return p.Port.Equals(this.Port) && p.IpAddress.Equals(this.IpAddress); 35 25 } 26 public override int GetHashCode() { 27 return this.IpAddress.GetHashCode(); 28 } 29 } 36 30 }
Note: See TracChangeset
for help on using the changeset viewer.