public override int GetHashCode() { unchecked { var hashCode = (EventKey != null ? EventKey.GetHashCode() : 0); hashCode = (hashCode * 397) ^ StartDate.GetHashCode(); hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TournamentKey != null ? TournamentKey.GetHashCode() : 0); hashCode = TeamsKeys.Aggregate(hashCode, (ac, x) => (ac * 397) ^ x.GetHashCode()); hashCode = (hashCode * 397) ^ (Scoreboard != null ? Scoreboard.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Markets != null ? Markets.GetHashCode() : 0); return(hashCode); } }
public bool Equals(EventData other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(string.Equals(EventKey, other.EventKey) && StartDate.Equals(other.StartDate) && string.Equals(Name, other.Name) && string.Equals(TournamentKey, other.TournamentKey) && TeamsKeys.SequenceEqual(other.TeamsKeys) && Scoreboard.Equals(other.Scoreboard) && DictionaryComparer <string, MarketData> .Default.Equals(Markets, other.Markets)); }