using Muchinfo.MTPClient.Data.Enums; using System; using System.Collections.Generic; namespace Muchinfo.MTPClient.Data.Model.Account { /// /// 日志实体 /// public class Log { /// /// 日志记录时间 /// public DateTime Time { get; set; } /// /// 日志记录时间 /// public string TimeText { get { return Time.ToString("HH:mm:ss"); } } /// /// 日志内容 /// public string Content { get; set; } /// /// 日志类型 /// public LogType LogType { get; set; } public Log() { Time = DateTime.Now; } } public class LogComparer : IEqualityComparer { /// /// Equalses the specified x. /// /// The x. /// The y. /// true if XXXX, false otherwise. public bool Equals(Log x, Log y) { if (x == null || y == null) { return false; } return (x.LogType == y.LogType && x.Time == y.Time); } /// /// Returns a hash code for this instance. /// /// The object. /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. public int GetHashCode(Log obj) { return obj.Time.GetHashCode(); } } }