public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (BuyerId?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (PrimaryPhone?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (SecondaryPhone?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Fax?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (WebSite?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Company?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (AnnualTurnOver?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (LegalRepresentative?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Rating?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (CreditInsurance.GetHashCode());
            hashCode = hashCode * -1521134295 + (Logo?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (AddressOne?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (AddressTwo?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (VatNumber?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ContactPerson?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Prefix?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Temp?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (UserName?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (PasswordHash?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (SecurityStamp?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (EmailConfirmed.GetHashCode());
            hashCode = hashCode * -1521134295 + (LockoutEnabled.GetHashCode());
            hashCode = hashCode * -1521134295 + (PhoneNumberConfirmed.GetHashCode());
            hashCode = hashCode * -1521134295 + (TwoFactorEnabled.GetHashCode());
            hashCode = hashCode * -1521134295 + (AccessFailedCount?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Name?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Email?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (PhoneNumber?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (LockoutEndDate?.GetHashCode() ?? 0);
            return(hashCode);
        }
예제 #2
0
 /// <summary>
 ///     Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked            // Overflow is fine, just wrap
     {
         int hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Industry != null)
         {
             hashCode = hashCode * 59 + Industry.GetHashCode();
         }
         if (Classification != null)
         {
             hashCode = hashCode * 59 + Classification.GetHashCode();
         }
         if (ListedDate != null)
         {
             hashCode = hashCode * 59 + ListedDate.GetHashCode();
         }
         if (DelistedDate != null)
         {
             hashCode = hashCode * 59 + DelistedDate.GetHashCode();
         }
         if (RegisteredCapital != null)
         {
             hashCode = hashCode * 59 + RegisteredCapital.GetHashCode();
         }
         if (LegalRepresentative != null)
         {
             hashCode = hashCode * 59 + LegalRepresentative.GetHashCode();
         }
         if (GeneralManager != null)
         {
             hashCode = hashCode * 59 + GeneralManager.GetHashCode();
         }
         if (Secretary != null)
         {
             hashCode = hashCode * 59 + Secretary.GetHashCode();
         }
         if (EmployeeCount != null)
         {
             hashCode = hashCode * 59 + EmployeeCount.GetHashCode();
         }
         if (Province != null)
         {
             hashCode = hashCode * 59 + Province.GetHashCode();
         }
         if (City != null)
         {
             hashCode = hashCode * 59 + City.GetHashCode();
         }
         if (Office != null)
         {
             hashCode = hashCode * 59 + Office.GetHashCode();
         }
         if (Email != null)
         {
             hashCode = hashCode * 59 + Email.GetHashCode();
         }
         if (Website != null)
         {
             hashCode = hashCode * 59 + Website.GetHashCode();
         }
         if (BusinessScope != null)
         {
             hashCode = hashCode * 59 + BusinessScope.GetHashCode();
         }
         if (MainBusiness != null)
         {
             hashCode = hashCode * 59 + MainBusiness.GetHashCode();
         }
         if (Introduction != null)
         {
             hashCode = hashCode * 59 + Introduction.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #3
0
        /// <summary>
        ///     Returns true if StockInfo instances are equal
        /// </summary>
        /// <param name="other">Instance of StockInfo to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(StockInfo other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                     ) &&
                 (
                     Industry == other.Industry ||
                     Industry != null &&
                     Industry.Equals(other.Industry)
                 ) &&
                 (
                     Classification == other.Classification ||
                     Classification != null &&
                     Classification.Equals(other.Classification)
                 ) &&
                 (
                     ListedDate == other.ListedDate ||
                     ListedDate != null &&
                     ListedDate.Equals(other.ListedDate)
                 ) &&
                 (
                     DelistedDate == other.DelistedDate ||
                     DelistedDate != null &&
                     DelistedDate.Equals(other.DelistedDate)
                 ) &&
                 (
                     RegisteredCapital == other.RegisteredCapital ||
                     RegisteredCapital != null &&
                     RegisteredCapital.Equals(other.RegisteredCapital)
                 ) &&
                 (
                     LegalRepresentative == other.LegalRepresentative ||
                     LegalRepresentative != null &&
                     LegalRepresentative.Equals(other.LegalRepresentative)
                 ) &&
                 (
                     GeneralManager == other.GeneralManager ||
                     GeneralManager != null &&
                     GeneralManager.Equals(other.GeneralManager)
                 ) &&
                 (
                     Secretary == other.Secretary ||
                     Secretary != null &&
                     Secretary.Equals(other.Secretary)
                 ) &&
                 (
                     EmployeeCount == other.EmployeeCount ||
                     EmployeeCount != null &&
                     EmployeeCount.Equals(other.EmployeeCount)
                 ) &&
                 (
                     Province == other.Province ||
                     Province != null &&
                     Province.Equals(other.Province)
                 ) &&
                 (
                     City == other.City ||
                     City != null &&
                     City.Equals(other.City)
                 ) &&
                 (
                     Office == other.Office ||
                     Office != null &&
                     Office.Equals(other.Office)
                 ) &&
                 (
                     Email == other.Email ||
                     Email != null &&
                     Email.Equals(other.Email)
                 ) &&
                 (
                     Website == other.Website ||
                     Website != null &&
                     Website.Equals(other.Website)
                 ) &&
                 (
                     BusinessScope == other.BusinessScope ||
                     BusinessScope != null &&
                     BusinessScope.Equals(other.BusinessScope)
                 ) &&
                 (
                     MainBusiness == other.MainBusiness ||
                     MainBusiness != null &&
                     MainBusiness.Equals(other.MainBusiness)
                 ) &&
                 (
                     Introduction == other.Introduction ||
                     Introduction != null &&
                     Introduction.Equals(other.Introduction)
                 ));
        }