Ejemplo n.º 1
0
 /// <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 (OrderSummary != null)
         {
             hashCode = hashCode * 59 + OrderSummary.GetHashCode();
         }
         if (Membership != null)
         {
             hashCode = hashCode * 59 + Membership.GetHashCode();
         }
         if (LineItems != null)
         {
             hashCode = hashCode * 59 + LineItems.GetHashCode();
         }
         if (Addresses != null)
         {
             hashCode = hashCode * 59 + Addresses.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            int hashCode = 401631729;

            if (Id != null)
            {
                hashCode += Id.GetHashCode();
            }

            if (LocationId != null)
            {
                hashCode += LocationId.GetHashCode();
            }

            if (ReferenceId != null)
            {
                hashCode += ReferenceId.GetHashCode();
            }

            if (Source != null)
            {
                hashCode += Source.GetHashCode();
            }

            if (CustomerId != null)
            {
                hashCode += CustomerId.GetHashCode();
            }

            if (LineItems != null)
            {
                hashCode += LineItems.GetHashCode();
            }

            if (Taxes != null)
            {
                hashCode += Taxes.GetHashCode();
            }

            if (Discounts != null)
            {
                hashCode += Discounts.GetHashCode();
            }

            if (ServiceCharges != null)
            {
                hashCode += ServiceCharges.GetHashCode();
            }

            if (Fulfillments != null)
            {
                hashCode += Fulfillments.GetHashCode();
            }

            if (Returns != null)
            {
                hashCode += Returns.GetHashCode();
            }

            if (ReturnAmounts != null)
            {
                hashCode += ReturnAmounts.GetHashCode();
            }

            if (NetAmounts != null)
            {
                hashCode += NetAmounts.GetHashCode();
            }

            if (RoundingAdjustment != null)
            {
                hashCode += RoundingAdjustment.GetHashCode();
            }

            if (Tenders != null)
            {
                hashCode += Tenders.GetHashCode();
            }

            if (Refunds != null)
            {
                hashCode += Refunds.GetHashCode();
            }

            if (Metadata != null)
            {
                hashCode += Metadata.GetHashCode();
            }

            if (CreatedAt != null)
            {
                hashCode += CreatedAt.GetHashCode();
            }

            if (UpdatedAt != null)
            {
                hashCode += UpdatedAt.GetHashCode();
            }

            if (ClosedAt != null)
            {
                hashCode += ClosedAt.GetHashCode();
            }

            if (State != null)
            {
                hashCode += State.GetHashCode();
            }

            if (Version != null)
            {
                hashCode += Version.GetHashCode();
            }

            if (TotalMoney != null)
            {
                hashCode += TotalMoney.GetHashCode();
            }

            if (TotalTaxMoney != null)
            {
                hashCode += TotalTaxMoney.GetHashCode();
            }

            if (TotalDiscountMoney != null)
            {
                hashCode += TotalDiscountMoney.GetHashCode();
            }

            if (TotalTipMoney != null)
            {
                hashCode += TotalTipMoney.GetHashCode();
            }

            if (TotalServiceChargeMoney != null)
            {
                hashCode += TotalServiceChargeMoney.GetHashCode();
            }

            if (PricingOptions != null)
            {
                hashCode += PricingOptions.GetHashCode();
            }

            if (Rewards != null)
            {
                hashCode += Rewards.GetHashCode();
            }

            return(hashCode);
        }
 public override int GetHashCode()
 {
     return(LineItems != null ? LineItems.GetHashCode() : 0);
 }
Ejemplo n.º 4
0
 public override int GetHashCode()
 {
     return(LineItems.GetHashCode() ^
            Title.GetHashCode(StringComparison.Ordinal));
 }