Beispiel #1
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                var hashCode = 41;
                // Suitable nullity checks etc, of course :)
                if (FriendWristbandId != null)
                {
                    hashCode = hashCode * 59 + FriendWristbandId.GetHashCode();
                }
                if (WristbandId != null)
                {
                    hashCode = hashCode * 59 + WristbandId.GetHashCode();
                }

                return(hashCode);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Returns true if Thing instances are equal
        /// </summary>
        /// <param name="other">Instance of Thing to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(FriendAdd other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     FriendWristbandId == other.FriendWristbandId ||
                     FriendWristbandId != null &&
                     FriendWristbandId.Equals(other.FriendWristbandId)
                     ) &&
                 (
                     WristbandId == other.WristbandId ||
                     WristbandId != null &&
                     WristbandId.Equals(other.WristbandId)
                 ));
        }
        /// <summary>
        /// Returns true if Thing instances are equal
        /// </summary>
        /// <param name="other">Instance of Thing to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(FriendFinderRegister other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     NickName == other.NickName ||
                     NickName != null &&
                     NickName.Equals(other.NickName)
                     ) &&
                 (
                     WristbandId == other.WristbandId ||
                     WristbandId != null &&
                     WristbandId.Equals(other.WristbandId)
                 ));
        }