Exemplo n.º 1
0
        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)));
        }
Exemplo n.º 2
0
        public bool Equals(Match other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(GameMode == other.GameMode &&
                   IsMatchComplete == other.IsMatchComplete &&
                   string.Equals(MapId, other.MapId) &&
                   MatchDuration.Equals(other.MatchDuration) &&
                   MatchEndReason == other.MatchEndReason &&
                   MatchId.Equals(other.MatchId) &&
                   Equals(MatchStartDate, other.MatchStartDate) &&
                   MatchType == other.MatchType &&
                   Players.OrderBy(p => p.Key).SequenceEqual(other.Players.OrderBy(p => p.Key)) &&
                   PlaylistId.Equals(other.PlaylistId) &&
                   SeasonId.Equals(other.SeasonId) &&
                   Teams.OrderBy(t => t.Key).SequenceEqual(other.Teams.OrderBy(t => t.Key)) &&
                   VictoryCondition == other.VictoryCondition);
        }