mirror of
https://github.com/ncblakely/GiantsTools
synced 2024-11-24 15:15:37 +01:00
27 lines
696 B
C#
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();
|
|
}
|
|
}
|
|
}
|