public bool Equals(DestinyActivityMatchmakingBlockDefinition input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     IsMatchmade == input.IsMatchmade ||
                     (IsMatchmade != null && IsMatchmade.Equals(input.IsMatchmade))
                     ) &&
                 (
                     MinParty == input.MinParty ||
                     (MinParty.Equals(input.MinParty))
                 ) &&
                 (
                     MaxParty == input.MaxParty ||
                     (MaxParty.Equals(input.MaxParty))
                 ) &&
                 (
                     MaxPlayers == input.MaxPlayers ||
                     (MaxPlayers.Equals(input.MaxPlayers))
                 ) &&
                 (
                     RequiresGuardianOath == input.RequiresGuardianOath ||
                     (RequiresGuardianOath != null && RequiresGuardianOath.Equals(input.RequiresGuardianOath))
                 ));
        }
コード例 #2
0
        /// <summary>
        ///     Returns true if GameRules instances are equal
        /// </summary>
        /// <param name="other">Instance of GameRules to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(GameRules other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     PlayerNamesVisible == other.PlayerNamesVisible ||
                     PlayerNamesVisible.Equals(other.PlayerNamesVisible)
                     ) &&
                 (
                     MaxPlayers == other.MaxPlayers ||
                     MaxPlayers.Equals(other.MaxPlayers)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     RobotsPerPlayer == other.RobotsPerPlayer ||
                     RobotsPerPlayer.Equals(other.RobotsPerPlayer)
                 ) &&
                 (
                     Password == other.Password ||
                     Password != null &&
                     Password.Equals(other.Password)
                 ) &&
                 (
                     FillWithBots == other.FillWithBots ||
                     FillWithBots.Equals(other.FillWithBots)
                 ));
        }