/// <summary> /// Returns true if MarketFilter instances are equal /// </summary> /// <param name="other">Instance of MarketFilter to be compared</param> /// <returns>Boolean</returns> public bool Equals(MarketFilter other) { // credit: http://stackoverflow.com/a/10454552/677735 if (other == null) { return(false); } return((CountryCodes == other.CountryCodes || CountryCodes != null && CountryCodes.SequenceEqual(other.CountryCodes)) && (BettingTypes == other.BettingTypes || BettingTypes != null && BettingTypes.SequenceEqual(other.BettingTypes)) && (TurnInPlayEnabled == other.TurnInPlayEnabled || TurnInPlayEnabled != null && TurnInPlayEnabled.Equals(other.TurnInPlayEnabled)) && (MarketTypes == other.MarketTypes || MarketTypes != null && MarketTypes.SequenceEqual(other.MarketTypes)) && (Venues == other.Venues || Venues != null && Venues.SequenceEqual(other.Venues)) && (MarketIds == other.MarketIds || MarketIds != null && MarketIds.SequenceEqual(other.MarketIds)) && (EventTypeIds == other.EventTypeIds || EventTypeIds != null && EventTypeIds.SequenceEqual(other.EventTypeIds)) && (EventIds == other.EventIds || EventIds != null && EventIds.SequenceEqual(other.EventIds)) && (BspMarket == other.BspMarket || BspMarket != null && BspMarket.Equals(other.BspMarket))); }