QuoteGoodsComparer.cs 607 B

12345678910111213141516171819202122232425
  1. using Muchinfo.MTPClient.Data.Model;
  2. using System.Collections.Generic;
  3. namespace Muchinfo.MTPClient.Infrastructure.Comparers
  4. {
  5. /// <summary>
  6. /// QuoteGoodsComparer类
  7. /// </summary>
  8. public class QuoteGoodsComparer : IEqualityComparer<QuoteGoods>
  9. {
  10. public bool Equals(QuoteGoods x, QuoteGoods y)
  11. {
  12. if (x == null || y == null)
  13. {
  14. return false;
  15. }
  16. return x.Symbol == y.Symbol;
  17. }
  18. public int GetHashCode(QuoteGoods obj)
  19. {
  20. return obj.Symbol.GetHashCode();
  21. }
  22. }
  23. }