1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-16 19:55:36 +01:00
GiantsTools/Giants.DataContract/Contracts/V1/ServerInfoWithHostAddress.cs

27 lines
709 B
C#
Raw Normal View History

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