Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 13588 was 13524, checked in by thasling, 9 years ago

Upload des Projekts letztendlich, trotz buggendes Clients...

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