2020-08-16 11:03:10 +02:00
|
|
|
|
namespace Giants.DataContract.V1
|
2020-08-08 08:53:35 +02:00
|
|
|
|
{
|
|
|
|
|
using System;
|
2020-08-08 09:07:11 +02:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2020-08-08 08:53:35 +02:00
|
|
|
|
|
2020-08-08 09:07:11 +02:00
|
|
|
|
public class ServerInfoWithHostAddress : ServerInfo
|
2020-08-08 08:53:35 +02:00
|
|
|
|
{
|
2020-08-08 09:07:11 +02:00
|
|
|
|
[Required]
|
2020-08-08 08:53:35 +02:00
|
|
|
|
public string HostIpAddress { get; set; }
|
2020-08-09 11:10:33 +02:00
|
|
|
|
|
|
|
|
|
public override bool Equals(object obj)
|
|
|
|
|
{
|
|
|
|
|
return obj is ServerInfoWithHostAddress address &&
|
|
|
|
|
base.Equals(obj) &&
|
2020-09-06 01:47:00 +02:00
|
|
|
|
this.HostIpAddress == address.HostIpAddress;
|
2020-08-09 11:10:33 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override int GetHashCode()
|
|
|
|
|
{
|
|
|
|
|
HashCode hash = new HashCode();
|
|
|
|
|
hash.Add(base.GetHashCode());
|
2020-09-06 01:47:00 +02:00
|
|
|
|
hash.Add(this.HostIpAddress);
|
2020-08-09 11:10:33 +02:00
|
|
|
|
return hash.ToHashCode();
|
|
|
|
|
}
|
2020-08-08 08:53:35 +02:00
|
|
|
|
}
|
|
|
|
|
}
|