Free cookie consent management tool by TermsFeed Policy Generator

source: branches/thasling/DistributedGA/DistributedGA.Core/Domain/PeerInfo.cs @ 15762

Last change on this file since 15762 was 13924, checked in by thasling, 8 years ago

#2615:
delete unneeded project, appended code style

File size: 777 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6
7namespace 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; }
13
14    public override bool Equals(System.Object obj) {
15      if (obj == null) {
16        return false;
17      }
18
19      PeerInfo p = obj as PeerInfo;
20      if ((System.Object)p == null) {
21        return false;
22      }
23
24      return p.Port.Equals(this.Port) && p.IpAddress.Equals(this.IpAddress);
25    }
26    public override int GetHashCode() {
27      return this.IpAddress.GetHashCode();
28    }
29  }
30}
Note: See TracBrowser for help on using the repository browser.