Beispiel #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (FromUserID.Length != 0)
            {
                hash ^= FromUserID.GetHashCode();
            }
            if (ToUserID.Length != 0)
            {
                hash ^= ToUserID.GetHashCode();
            }
            if (UserType != 0)
            {
                hash ^= UserType.GetHashCode();
            }
            if (FileName.Length != 0)
            {
                hash ^= FileName.GetHashCode();
            }
            if (Data.Length != 0)
            {
                hash ^= Data.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Beispiel #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PhoneName.Length != 0)
            {
                hash ^= PhoneName.GetHashCode();
            }
            if (PhoneSystem.Length != 0)
            {
                hash ^= PhoneSystem.GetHashCode();
            }
            if (PhoneModel.Length != 0)
            {
                hash ^= PhoneModel.GetHashCode();
            }
            if (PhoneProducter.Length != 0)
            {
                hash ^= PhoneProducter.GetHashCode();
            }
            if (AppVersion.Length != 0)
            {
                hash ^= AppVersion.GetHashCode();
            }
            if (PhoneMac.Length != 0)
            {
                hash ^= PhoneMac.GetHashCode();
            }
            if (PhoneImei.Length != 0)
            {
                hash ^= PhoneImei.GetHashCode();
            }
            if (PhoneIp.Length != 0)
            {
                hash ^= PhoneIp.GetHashCode();
            }
            if (UserId.Length != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (PlaceCode.Length != 0)
            {
                hash ^= PlaceCode.GetHashCode();
            }
            if (AppCode.Length != 0)
            {
                hash ^= AppCode.GetHashCode();
            }
            if (UserType.Length != 0)
            {
                hash ^= UserType.GetHashCode();
            }
            if (Timestamps != 0L)
            {
                hash ^= Timestamps.GetHashCode();
            }
            return(hash);
        }
        /// <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);
            }
        }
Beispiel #4
0
        public override int GetHashCode()
        {
            int result = 1;

            result = (result * 397) ^ (Comment != null ? Comment.GetHashCode() : 0);
            result = (result * 397) ^ (Email != null ? Email.GetHashCode() : 0);
            result = (result * 397) ^ (FailedPasswordAttemptsCount != null ? FailedPasswordAttemptsCount.GetHashCode() : 0);
            result = (result * 397) ^ (FailedPasswordAttemptWindowStart != null ? FailedPasswordAttemptWindowStart.GetHashCode() : 0);
            result = (result * 397) ^ Id.GetHashCode();
            result = (result * 397) ^ IsApproved.GetHashCode();
            result = (result * 397) ^ IsFirstTimeUser.GetHashCode();
            result = (result * 397) ^ IsLockedOut.GetHashCode();
            result = (result * 397) ^ (LastActivityDate != null ? LastActivityDate.GetHashCode() : 0);
            result = (result * 397) ^ (LastLoginDate != null ? LastLoginDate.GetHashCode() : 0);
            result = (result * 397) ^ (LastPasswordChangeDate != null ? LastPasswordChangeDate.GetHashCode() : 0);
            result = (result * 397) ^ (Password != null ? Password.GetHashCode() : 0);
            result = (result * 397) ^ (PasswordKey != null ? PasswordKey.GetHashCode() : 0);
            result = (result * 397) ^ (Username != null ? Username.GetHashCode() : 0);
            result = (result * 397) ^ UserType.GetHashCode();
            return(result);
        }