2020-08-08 08:53:35 +02:00
|
|
|
|
namespace Giants.DataContract
|
|
|
|
|
{
|
|
|
|
|
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) &&
|
|
|
|
|
HostIpAddress == address.HostIpAddress;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override int GetHashCode()
|
|
|
|
|
{
|
|
|
|
|
HashCode hash = new HashCode();
|
|
|
|
|
hash.Add(base.GetHashCode());
|
|
|
|
|
hash.Add(HostIpAddress);
|
|
|
|
|
return hash.ToHashCode();
|
|
|
|
|
}
|
2020-08-08 08:53:35 +02:00
|
|
|
|
}
|
|
|
|
|
}
|