1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-22 14:15:37 +01:00
GiantsTools/Giants.DataContract/Contracts/ServerInfoWithHostAddress.cs

27 lines
696 B
C#
Raw Normal View History

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