mirror of
https://github.com/ncblakely/GiantsTools
synced 2024-11-25 07:35:36 +01:00
27 lines
709 B
C#
27 lines
709 B
C#
namespace Giants.DataContract.V1
|
|
{
|
|
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) &&
|
|
this.HostIpAddress == address.HostIpAddress;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
HashCode hash = new HashCode();
|
|
hash.Add(base.GetHashCode());
|
|
hash.Add(this.HostIpAddress);
|
|
return hash.ToHashCode();
|
|
}
|
|
}
|
|
}
|