using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WisdomClient.data; namespace IntelligentControlForsx.Service.AGC { public class DataCompare : IEqualityComparer { public bool Equals(TsData x, TsData y) { return x.ts == y.ts;//自定义去重规则,此处将时间戳作为去重规则,相同的就作为重复记录 } public int GetHashCode(TsData obj) { return obj.ts.GetHashCode(); } } }