Exemple #1
0
        /// <summary>
        /// Returns true if Player instances are equal
        /// </summary>
        /// <param name="input">Instance of Player to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Player?input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Clan == input.Clan ||
                     (Clan != null &&
                      Clan.Equals(input.Clan))
                     ) &&
                 (
                     League == input.League ||
                     (League != null &&
                      League.Equals(input.League))
                 ) &&
                 (
                     Role == input.Role ||
                     Role.Equals(input.Role)
                 ) &&
                 (
                     AttackWins == input.AttackWins ||
                     AttackWins.Equals(input.AttackWins)
                 ) &&
                 (
                     DefenseWins == input.DefenseWins ||
                     DefenseWins.Equals(input.DefenseWins)
                 ) &&
                 (
                     TownHallLevel == input.TownHallLevel ||
                     TownHallLevel.Equals(input.TownHallLevel)
                 ) &&
                 (
                     TownHallWeaponLevel == input.TownHallWeaponLevel ||
                     TownHallWeaponLevel.Equals(input.TownHallWeaponLevel)
                 ) &&
                 (
                     VersusBattleWins == input.VersusBattleWins ||
                     VersusBattleWins.Equals(input.VersusBattleWins)
                 ) &&
                 (
                     LegendStatistics == input.LegendStatistics ||
                     (LegendStatistics != null &&
                      LegendStatistics.Equals(input.LegendStatistics))
                 ) &&
                 (
                     Troops == input.Troops ||
                     Troops != null &&
                     input.Troops != null &&
                     Troops.SequenceEqual(input.Troops)
                 ) &&
                 (
                     Heroes == input.Heroes ||
                     Heroes != null &&
                     input.Heroes != null &&
                     Heroes.SequenceEqual(input.Heroes)
                 ) &&
                 (
                     Spells == input.Spells ||
                     Spells != null &&
                     input.Spells != null &&
                     Spells.SequenceEqual(input.Spells)
                 ) &&
                 (
                     Labels == input.Labels ||
                     Labels != null &&
                     input.Labels != null &&
                     Labels.SequenceEqual(input.Labels)
                 ) &&
                 (
                     Tag == input.Tag ||
                     (Tag != null &&
                      Tag.Equals(input.Tag))
                 ) &&
                 (
                     Name == input.Name ||
                     (Name != null &&
                      Name.Equals(input.Name))
                 ) &&
                 (
                     ExpLevel == input.ExpLevel ||
                     ExpLevel.Equals(input.ExpLevel)
                 ) &&
                 (
                     Trophies == input.Trophies ||
                     Trophies.Equals(input.Trophies)
                 ) &&
                 (
                     BestTrophies == input.BestTrophies ||
                     BestTrophies.Equals(input.BestTrophies)
                 ) &&
                 (
                     Donations == input.Donations ||
                     Donations.Equals(input.Donations)
                 ) &&
                 (
                     DonationsReceived == input.DonationsReceived ||
                     DonationsReceived.Equals(input.DonationsReceived)
                 ) &&
                 (
                     BuilderHallLevel == input.BuilderHallLevel ||
                     BuilderHallLevel.Equals(input.BuilderHallLevel)
                 ) &&
                 (
                     VersusTrophies == input.VersusTrophies ||
                     VersusTrophies.Equals(input.VersusTrophies)
                 ) &&
                 (
                     BestVersusTrophies == input.BestVersusTrophies ||
                     BestVersusTrophies.Equals(input.BestVersusTrophies)
                 ) &&
                 (
                     WarStars == input.WarStars ||
                     WarStars.Equals(input.WarStars)
                 ) &&
                 (
                     Achievements == input.Achievements ||
                     Achievements != null &&
                     input.Achievements != null &&
                     Achievements.SequenceEqual(input.Achievements)
                 ) &&
                 (
                     VersusBattleWinCount == input.VersusBattleWinCount ||
                     VersusBattleWinCount.Equals(input.VersusBattleWinCount)
                 ));
        }