using Muchinfo.MTPClient.Data.Model; using System; using System.Collections.Generic; namespace Muchinfo.MTPClient.Infrastructure.Comparers { public class ExchangeDataModelComparer : IEqualityComparer { public bool Equals(Exchange x, Exchange y) { if (null == x || null == y) { return false; } return string.Compare(x.ExchangeCode, y.ExchangeCode, StringComparison.OrdinalIgnoreCase) == 0; } public int GetHashCode(Exchange obj) { return obj.ExchangeCode.GetHashCode(); } } }