Files
Web_CRICS_Server_VS2010_Prod/Domain/SearchHost.cs
2025-12-11 09:17:16 +08:00

47 lines
834 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Domain
{
public delegate void SearchHostResultHandler(SearchHost host);
public class SearchHost
{
public string IP { get; set; }
public string SubnetMask { get; set; }
public string Gateway { get; set; }
public int Port { get; set; }
public string MAC { get; set; }
public string HostNumber { get; set; }
public bool Registered { get; set; }
public string Version { get; set; }
public string ConfigVersion { get; set; }
public override int GetHashCode()
{
return this.IP.GetHashCode() ^ this.MAC.GetHashCode();
}
public override bool Equals(object obj)
{
var o = obj as SearchHost;
if (o == null)
{
return false;
}
return o.IP == this.IP && o.MAC == this.MAC;
}
}
}