Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(ContactId.GetHashCode() * 27 * PartyId.GetHashCode());
     }
 }
Exemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(ContactId.GetHashCode() * 27 * ContactDetailId.GetHashCode());
     }
 }
Exemplo n.º 3
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 + ContactId.GetHashCode();

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

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

                hash = hash * 59 + Active.GetHashCode();

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

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

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

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

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

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


                return(hash);
            }
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = ContactId.GetHashCode();
         hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TelephoneNumber != null ? TelephoneNumber.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemplo n.º 5
0
        public override int GetHashCode()
        {
            int result = 29;

            result = result * 13 + ContactId.GetHashCode();

            if (RelatedContactID.HasValue)
            {
                result = result * 13 + RelatedContactID.Value.GetHashCode();
            }
            else if (RelatedUserID.HasValue)
            {
                result = result * 13 + RelatedUserID.Value.GetHashCode();
            }

            return(result);
        }
Exemplo n.º 6
0
 public override int GetHashCode()
 {
     return(Tenant.GetHashCode() ^ User.GetHashCode() ^ ContactId.GetHashCode() ^ Data.GetHashCode() ^
            Type.GetHashCode() ^ IsPrimary.GetHashCode());
 }
Exemplo n.º 7
0
 public override int GetHashCode()
 {
     return(ContactId.GetHashCode());
 }