using System; using System.Collections.Generic; using System.Text; namespace FreeNameLibrary { public class DomainCheck : IComparable{ protected int id; protected int partnerId; protected string domainName; protected int checkCount; protected DateTime firstChecked; protected DateTime lastChecked; public int Id { get { return id; } set { id = value; } } public int PartnerId { get { return partnerId; } set { partnerId = value; } } public string DomainName { get { return domainName; } set { domainName = value; } } public int CheckCount { get { return checkCount; } set { checkCount = value; } } public DateTime FirstChecked { get { return firstChecked; } set { firstChecked = value; } } public DateTime LastChecked { get { return lastChecked; } set { lastChecked = value; } } public int CompareTo(object obj) { if (!(obj is DomainCheck)) { throw new InvalidCastException("This object is not of type DomainCheck"); } DomainCheck other = (DomainCheck)obj; return this.LastChecked.CompareTo(other.LastChecked); } } }