using System;
using System.Collections.Generic;
namespace MuchInfo.Chart.Data.Interfaces
{
///
/// 日期数据点接口
///
public interface IDateDataPoint
{
///
/// 时间
///
DateTime Date { get; set; }
}
///
/// 比较时间
///
public class DataPointComparer : IEqualityComparer
where T : IDateDataPoint
{
public bool Equals(T x, T y)
{
return x.Date.CompareTo(y.Date) == 0;
}
public int GetHashCode(T obj)
{
return obj.Date.GetHashCode();
}
}
}