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

            if (UserId.Length != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (legalName_ != null)
            {
                hash ^= LegalName.GetHashCode();
            }
            if (Token.Length != 0)
            {
                hash ^= Token.GetHashCode();
            }
            if (expireAt_ != null)
            {
                hash ^= ExpireAt.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#2
0
        /// <summary>
        ///   Serves as a hash function for a particular type.
        /// </summary>
        /// <returns>
        ///   A hash code for the current <see cref = "T:System.Object" />.
        /// </returns>
        /// <filterpriority>2</filterpriority>
        public override int GetHashCode()
        {
            unchecked
            {
                int result = LegalName != null?LegalName.GetHashCode() : 0;

                result = (result * 397) ^ (DoingBusinessAsName != null ? DoingBusinessAsName.GetHashCode() : 0);
                result = (result * 397) ^ (DisplayName != null ? DisplayName.GetHashCode() : 0);
                return(result);
            }
        }
 /// <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 (LastUpdateTime != null)
         {
             hashCode = hashCode * 59 + LastUpdateTime.GetHashCode();
         }
         if (AgentFirstName != null)
         {
             hashCode = hashCode * 59 + AgentFirstName.GetHashCode();
         }
         if (AgentLastName != null)
         {
             hashCode = hashCode * 59 + AgentLastName.GetHashCode();
         }
         if (AgentRole != null)
         {
             hashCode = hashCode * 59 + AgentRole.GetHashCode();
         }
         if (BusinessName != null)
         {
             hashCode = hashCode * 59 + BusinessName.GetHashCode();
         }
         if (LegalName != null)
         {
             hashCode = hashCode * 59 + LegalName.GetHashCode();
         }
         if (ShortName != null)
         {
             hashCode = hashCode * 59 + ShortName.GetHashCode();
         }
         if (Abn != null)
         {
             hashCode = hashCode * 59 + Abn.GetHashCode();
         }
         if (Acn != null)
         {
             hashCode = hashCode * 59 + Acn.GetHashCode();
         }
         if (IsACNCRegistered != null)
         {
             hashCode = hashCode * 59 + IsACNCRegistered.GetHashCode();
         }
         if (IndustryCode != null)
         {
             hashCode = hashCode * 59 + IndustryCode.GetHashCode();
         }
         if (OrganisationType != null)
         {
             hashCode = hashCode * 59 + OrganisationType.GetHashCode();
         }
         if (RegisteredCountry != null)
         {
             hashCode = hashCode * 59 + RegisteredCountry.GetHashCode();
         }
         if (EstablishmentDate != null)
         {
             hashCode = hashCode * 59 + EstablishmentDate.GetHashCode();
         }
         return(hashCode);
     }
 }