Exemple #1
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);
        }
Exemple #2
0
        public bool Equals(PlayerMatch other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(Equals(ExperienceProgress, other.ExperienceProgress) &&
                   GameMode == other.GameMode &&
                   LeaderId == other.LeaderId &&
                   string.Equals(MapId, other.MapId) &&
                   MatchId.Equals(other.MatchId) &&
                   Equals(MatchStartDate, other.MatchStartDate) &&
                   MatchType == other.MatchType &&
                   PlayerCompletedMatch == other.PlayerCompletedMatch &&
                   PlayerIndex == other.PlayerIndex &&
                   PlayerMatchDuration.Equals(other.PlayerMatchDuration) &&
                   PlayerMatchOutcome == other.PlayerMatchOutcome &&
                   PlaylistId.Equals(other.PlaylistId) &&
                   Equals(RatingProgress, other.RatingProgress) &&
                   SeasonId.Equals(other.SeasonId) &&
                   TeamId == other.TeamId &&
                   TeamPlayerIndex == other.TeamPlayerIndex &&
                   Teams.OrderBy(t => t.Key).SequenceEqual(other.Teams.OrderBy(t => t.Key)));
        }
Exemple #3
0
        /// <summary>
        /// Returns true if Person instances are equal
        /// </summary>
        /// <param name="other">Instance of Person to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Person other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     FirstName == other.FirstName ||
                     FirstName != null &&
                     FirstName.Equals(other.FirstName)
                     ) &&
                 (
                     Surname == other.Surname ||
                     Surname != null &&
                     Surname.Equals(other.Surname)
                 ) &&
                 (
                     DateOfBirth == other.DateOfBirth ||
                     DateOfBirth != null &&
                     DateOfBirth.Equals(other.DateOfBirth)
                 ) &&
                 (
                     PersonGender == other.PersonGender ||

                     PersonGender.Equals(other.PersonGender)
                 ) &&
                 (
                     MatchId == other.MatchId ||
                     MatchId != null &&
                     MatchId.Equals(other.MatchId)
                 ) &&
                 (
                     AllocatePersonId == other.AllocatePersonId ||
                     AllocatePersonId != null &&
                     AllocatePersonId.Equals(other.AllocatePersonId)
                 ) &&
                 (
                     Email == other.Email ||
                     Email != null &&
                     Email.Equals(other.Email)
                 ) &&
                 (
                     TelephoneNumber == other.TelephoneNumber ||
                     TelephoneNumber != null &&
                     TelephoneNumber.Equals(other.TelephoneNumber)
                 ) &&
                 (
                     ExtSystemId == other.ExtSystemId ||
                     ExtSystemId != null &&
                     ExtSystemId.Equals(other.ExtSystemId)
                 ));
        }
Exemple #4
0
        public bool Equals(MatchStart other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(base.Equals(other) &&
                   GameMode == other.GameMode &&
                   IsDefaultRuleSet == other.IsDefaultRuleSet &&
                   string.Equals(MapId, other.MapId) &&
                   MatchId.Equals(other.MatchId) &&
                   MatchType == other.MatchType &&
                   PlaylistId.Equals(other.PlaylistId) &&
                   TeamSize == other.TeamSize);
        }