Esempio n. 1
0
        /// <summary>
        ///     Returns true if Upgrade instances are equal
        /// </summary>
        /// <param name="other">Instance of Upgrade to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Upgrade other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Cost == other.Cost ||
                     Cost.Equals(other.Cost)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Permanent == other.Permanent ||
                     Permanent.Equals(other.Permanent)
                 ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ) &&
                 (
                     Rounds == other.Rounds ||
                     Rounds.Equals(other.Rounds)
                 ) &&
                 (
                     Values == other.Values ||
                     Values != null &&
                     other.Values != null &&
                     Values.SequenceEqual(other.Values)
                 ) &&
                 (
                     Type == other.Type ||
                     Type.Equals(other.Type)
                 ) &&
                 (
                     Id == other.Id ||
                     Id.Equals(other.Id)
                 ));
        }