public bool Equals(Result other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(GameBaseVariantId.Equals(other.GameBaseVariantId) && Equals(GameVariant, other.GameVariant) && HopperId.Equals(other.HopperId) && Equals(Id, other.Id) && IsTeamGame == other.IsTeamGame && Links.OrderBy(l => l.Key).SequenceEqual(other.Links.OrderBy(l => l.Key)) && MapId.Equals(other.MapId) && Equals(MapVariant, other.MapVariant) && Equals(MatchCompletedDate, other.MatchCompletedDate) && MatchDuration.Equals(other.MatchDuration) && Players.OrderBy(p => p.Identity.Gamertag).SequenceEqual(other.Players.OrderBy(p => p.Identity.Gamertag)) && SeasonId.Equals(other.SeasonId) && MatchCompletedDateFidelity == other.MatchCompletedDateFidelity && Teams.OrderBy(t => t.Id).SequenceEqual(other.Teams.OrderBy(t => t.Id))); }
public override int GetHashCode() { unchecked { var hashCode = GameBaseVariantId.GetHashCode(); hashCode = (hashCode * 397) ^ (GameVariant?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ HopperId.GetHashCode(); hashCode = (hashCode * 397) ^ (Id?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ IsTeamGame.GetHashCode(); hashCode = (hashCode * 397) ^ (Links?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ MapId.GetHashCode(); hashCode = (hashCode * 397) ^ (MapVariant?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (MatchCompletedDate?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ MatchDuration.GetHashCode(); hashCode = (hashCode * 397) ^ (Players?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ SeasonId.GetHashCode(); hashCode = (hashCode * 397) ^ MatchCompletedDateFidelity; hashCode = (hashCode * 397) ^ (Teams?.GetHashCode() ?? 0); return(hashCode); } }