IW4M-Admin/SharedLibraryCore/Dtos/Meta/Responses/UpdatedAliasResponse.cs

23 lines
604 B
C#
Raw Normal View History

using System;
namespace SharedLibraryCore.Dtos.Meta.Responses
{
public class UpdatedAliasResponse : BaseMetaResponse
{
public string Name { get; set; }
public string IPAddress { get; set; } = "--";
public override bool Equals(object obj)
{
if (obj is UpdatedAliasResponse resp)
{
return resp.Name.StripColors() == Name.StripColors() && resp.IPAddress == IPAddress;
}
return false;
}
public override int GetHashCode() => HashCode.Combine(Name.StripColors(), IPAddress);
}
}