Example #1
0
        public override int GetHashCode()
        {
            var hashCode = 679641088;

            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + ExpiryDate.GetHashCode();
            return(hashCode);
        }
        public override int GetHashCode()
        {
            int hash = 13;

            hash = (hash * 7) + ExpiryDate?.GetHashCode() ?? 0;
            hash = (hash * 7) + MaxDownloads?.GetHashCode() ?? 0;
            hash = (hash * 7) + Password?.GetHashCode() ?? 0;
            hash = (hash * 7) + ViewOnly.GetHashCode();
            return(hash);
        }
Example #3
0
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return(ReservationId.GetHashCode() * 23 ^
                       ConnectorId.GetHashCode() * 19 ^
                       ExpiryDate.GetHashCode() * 17 ^
                       IdTag.GetHashCode() * 11 ^

                       (ParentIdTag.HasValue
                            ? ParentIdTag.GetHashCode()
                            : 0));
            }
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (ExpiryDate.Length != 0)
            {
                hash ^= ExpiryDate.GetHashCode();
            }
            hash ^= definitions_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #5
0
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return((ParentIdTag.HasValue
                            ? ParentIdTag.GetHashCode() * 7
                            : 0) ^

                       (ExpiryDate.HasValue
                            ? ExpiryDate.GetHashCode() * 5
                            : 0) ^

                       Status.GetHashCode());
            }
        }
Example #6
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked             // Overflow is fine, just wrap
            {
                int hash = 41;

                // Suitable nullity checks
                hash = hash * 59 + Id.GetHashCode();
                hash = hash * 59 + EffectiveDate.GetHashCode();

                if (ExpiryDate != null)
                {
                    hash = hash * 59 + ExpiryDate.GetHashCode();
                }

                if (Role != null)
                {
                    hash = hash * 59 + Role.GetHashCode();
                }

                return(hash);
            }
        }