1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-24 15:15:37 +01:00
GiantsTools/Giants.DataContract/Contracts/V1/ServerInfoWithHostAddress.cs
2020-08-10 00:29:28 -07:00

27 lines
696 B
C#

namespace Giants.DataContract
{
using System;
using System.ComponentModel.DataAnnotations;
public class ServerInfoWithHostAddress : ServerInfo
{
[Required]
public string HostIpAddress { get; set; }
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();
}
}
}