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 | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Threading.Tasks;
|
---|
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; }
|
---|
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.