Пример #1
0
        /// <summary>
        /// Returns the hashcode for this <see cref="DbField"/>.
        /// </summary>
        /// <returns>The hashcode value.</returns>
        public override int GetHashCode()
        {
            if (m_hashCode != null)
            {
                return(m_hashCode.Value);
            }

            var hashCode = 0;

            // Set the hashcode
            hashCode = Name.GetHashCode() + IsPrimary.GetHashCode() + IsIdentity.GetHashCode() + IsNullable.GetHashCode();
            if (Type != null)
            {
                hashCode += Type.GetHashCode();
            }
            if (Size != null)
            {
                hashCode += Size.GetHashCode();
            }
            if (Precision != null)
            {
                hashCode += Precision.GetHashCode();
            }
            if (Scale != null)
            {
                hashCode += Scale.GetHashCode();
            }
            if (DatabaseType != null)
            {
                hashCode += DatabaseType.GetHashCode();
            }

            // Set and return the hashcode
            return((m_hashCode = hashCode).Value);
        }
Пример #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (int)EventType;
         hashCode = (hashCode * 397) ^ (int)DeviceType;
         hashCode = (hashCode * 397) ^ (int)PointerId;
         hashCode = (hashCode * 397) ^ Position.GetHashCode();
         hashCode = (hashCode * 397) ^ Timestamp.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)KeyModifiers;
         hashCode = (hashCode * 397) ^ ContactRect.GetHashCode();
         hashCode = (hashCode * 397) ^ IsBarrelButtonPressed.GetHashCode();
         hashCode = (hashCode * 397) ^ IsCanceled.GetHashCode();
         hashCode = (hashCode * 397) ^ IsEraser.GetHashCode();
         hashCode = (hashCode * 397) ^ IsHorizontalMouseWheel.GetHashCode();
         hashCode = (hashCode * 397) ^ IsInRange.GetHashCode();
         hashCode = (hashCode * 397) ^ IsInverted.GetHashCode();
         hashCode = (hashCode * 397) ^ IsLeftButtonPressed.GetHashCode();
         hashCode = (hashCode * 397) ^ IsMiddleButtonPressed.GetHashCode();
         hashCode = (hashCode * 397) ^ IsRightButtonPressed.GetHashCode();
         hashCode = (hashCode * 397) ^ IsXButton1Pressed.GetHashCode();
         hashCode = (hashCode * 397) ^ IsXButton2Pressed.GetHashCode();
         hashCode = (hashCode * 397) ^ IsPrimary.GetHashCode();
         hashCode = (hashCode * 397) ^ MouseWheelDelta;
         hashCode = (hashCode * 397) ^ Orientation.GetHashCode();
         hashCode = (hashCode * 397) ^ TouchConfidence.GetHashCode();
         hashCode = (hashCode * 397) ^ Twist.GetHashCode();
         hashCode = (hashCode * 397) ^ XTilt.GetHashCode();
         hashCode = (hashCode * 397) ^ YTilt.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)PointerUpdateKind;
         return(hashCode);
     }
 }
Пример #3
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 (CountryId != null)
         {
             hashCode = hashCode * 59 + CountryId.GetHashCode();
         }
         if (NewCountryId != null)
         {
             hashCode = hashCode * 59 + NewCountryId.GetHashCode();
         }
         if (IsPrimary != null)
         {
             hashCode = hashCode * 59 + IsPrimary.GetHashCode();
         }
         if (SessionToken != null)
         {
             hashCode = hashCode * 59 + SessionToken.GetHashCode();
         }
         return(hashCode);
     }
 }
Пример #4
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            int hash = base.GetHashCode();

            hash = hash * 23 + IsPrimary.GetHashCode();
            hash = hash * 23 + IsReplyRequired.GetHashCode();

            return(hash);
        }
Пример #5
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 (Nickname != null)
         {
             hashCode = hashCode * 59 + Nickname.GetHashCode();
         }
         if (CountryId != null)
         {
             hashCode = hashCode * 59 + CountryId.GetHashCode();
         }
         if (Zip != null)
         {
             hashCode = hashCode * 59 + Zip.GetHashCode();
         }
         if (City != null)
         {
             hashCode = hashCode * 59 + City.GetHashCode();
         }
         if (AdministrativeArea != null)
         {
             hashCode = hashCode * 59 + AdministrativeArea.GetHashCode();
         }
         if (DependentLocality != null)
         {
             hashCode = hashCode * 59 + DependentLocality.GetHashCode();
         }
         if (SortingCode != null)
         {
             hashCode = hashCode * 59 + SortingCode.GetHashCode();
         }
         if (Organization != null)
         {
             hashCode = hashCode * 59 + Organization.GetHashCode();
         }
         if (AddressLine1 != null)
         {
             hashCode = hashCode * 59 + AddressLine1.GetHashCode();
         }
         if (AddressLine2 != null)
         {
             hashCode = hashCode * 59 + AddressLine2.GetHashCode();
         }
         if (IsPrimary != null)
         {
             hashCode = hashCode * 59 + IsPrimary.GetHashCode();
         }
         if (SessionToken != null)
         {
             hashCode = hashCode * 59 + SessionToken.GetHashCode();
         }
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Uom != null ? Uom.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsPrimary.GetHashCode();
         hashCode = (hashCode * 397) ^ GroupId;
         hashCode = (hashCode * 397) ^ (Group != null ? Group.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)ValueType;
         //hashCode = (hashCode*397) ^ (Values != null ? Values.GetHashCode() : 0);
         return(hashCode);
     }
 }
Пример #7
0
        public override int GetHashCode()
        {
            int hashCode = 2030292606;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(InviteLink);

            hashCode = hashCode * -1521134295 + EqualityComparer <User> .Default.GetHashCode(Creator);

            hashCode = hashCode * -1521134295 + CreatesJoinRequest.GetHashCode();
            hashCode = hashCode * -1521134295 + IsPrimary.GetHashCode();
            hashCode = hashCode * -1521134295 + IsRevoked.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + ExpireDate.GetHashCode();
            hashCode = hashCode * -1521134295 + MemberLimit.GetHashCode();
            hashCode = hashCode * -1521134295 + PendingJoinRequestCount.GetHashCode();
            return(hashCode);
        }
Пример #8
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = Id.GetHashCode();
                hashCode = (hashCode * 397) ^ EntityRefId.GetHashCode();
                hashCode = (hashCode * 397) ^ (Employer != null ? Employer.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ ContactTypeId;
                hashCode = (hashCode * 397) ^ PreferredContactMethodType;
                hashCode = (hashCode * 397) ^ IsPrimary.GetHashCode();
                hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (MiddleName != null ? MiddleName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (JobTitle != null ? JobTitle.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (BusinessPhone != null ? BusinessPhone.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (MobilePhone != null ? MobilePhone.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (HomePhone != null ? HomePhone.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Email != null ? Email.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ CreatedOn.GetHashCode();
                hashCode = (hashCode * 397) ^ ModifiedOn.GetHashCode();

                return(hashCode);
            }
        }