public override int GetHashCode() { unchecked { var hashCode = Billing != null?Billing.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (CartHash != null ? CartHash.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CartTax != null ? CartTax.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CreatedVia != null ? CreatedVia.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Currency != null ? Currency.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CustomerId; hashCode = (hashCode * 397) ^ (CustomerIpAddress != null ? CustomerIpAddress.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CustomerNote != null ? CustomerNote.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CustomerUserAgent != null ? CustomerUserAgent.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (DiscountTax != null ? DiscountTax.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (DiscountTotal != null ? DiscountTotal.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Id; hashCode = (hashCode * 397) ^ (Number != null ? Number.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (OrderKey != null ? OrderKey.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ParentId; hashCode = (hashCode * 397) ^ (PaymentMethod != null ? PaymentMethod.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PaymentMethodTitle != null ? PaymentMethodTitle.GetHashCode() : 0); hashCode = (hashCode * 397) ^ PricesIncludeTax.GetHashCode(); hashCode = (hashCode * 397) ^ (Shipping != null ? Shipping.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ShippingTax != null ? ShippingTax.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ShippingTotal != null ? ShippingTotal.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Total != null ? Total.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TotalTax != null ? TotalTax.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TransactionId != null ? TransactionId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Version != null ? Version.GetHashCode() : 0); return(hashCode); } }
/// <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 (AddressesAreIdentical != null) { hashCode = hashCode * 59 + AddressesAreIdentical.GetHashCode(); } if (BlackListData != null) { hashCode = hashCode * 59 + BlackListData.GetHashCode(); } if (CardOwnerAddress != null) { hashCode = hashCode * 59 + CardOwnerAddress.GetHashCode(); } if (CustomerIpAddress != null) { hashCode = hashCode * 59 + CustomerIpAddress.GetHashCode(); } if (DefaultFormFill != null) { hashCode = hashCode * 59 + DefaultFormFill.GetHashCode(); } if (DeviceFingerprintActivated != null) { hashCode = hashCode * 59 + DeviceFingerprintActivated.GetHashCode(); } if (DeviceFingerprintTransactionId != null) { hashCode = hashCode * 59 + DeviceFingerprintTransactionId.GetHashCode(); } if (GiftCardType != null) { hashCode = hashCode * 59 + GiftCardType.GetHashCode(); } if (GiftMessage != null) { hashCode = hashCode * 59 + GiftMessage.GetHashCode(); } if (HasForgottenPwd != null) { hashCode = hashCode * 59 + HasForgottenPwd.GetHashCode(); } if (HasPassword != null) { hashCode = hashCode * 59 + HasPassword.GetHashCode(); } if (IsPreviousCustomer != null) { hashCode = hashCode * 59 + IsPreviousCustomer.GetHashCode(); } if (OrderTimezone != null) { hashCode = hashCode * 59 + OrderTimezone.GetHashCode(); } if (ShipComments != null) { hashCode = hashCode * 59 + ShipComments.GetHashCode(); } if (ShipmentTrackingNumber != null) { hashCode = hashCode * 59 + ShipmentTrackingNumber.GetHashCode(); } if (ShippingDetails != null) { hashCode = hashCode * 59 + ShippingDetails.GetHashCode(); } if (UserData != null) { hashCode = hashCode * 59 + UserData.GetHashCode(); } if (Website != null) { hashCode = hashCode * 59 + Website.GetHashCode(); } return(hashCode); } }