Ejemplo n.º 1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (Consumer != null)
         {
             hashCode = hashCode * 59 + Consumer.GetHashCode();
         }
         if (Store != null)
         {
             hashCode = hashCode * 59 + Store.GetHashCode();
         }
         if (Subtotal != null)
         {
             hashCode = hashCode * 59 + Subtotal.GetHashCode();
         }
         if (Tax != null)
         {
             hashCode = hashCode * 59 + Tax.GetHashCode();
         }
         if (EstimatedPickupTime != null)
         {
             hashCode = hashCode * 59 + EstimatedPickupTime.GetHashCode();
         }
         if (IsPickup != null)
         {
             hashCode = hashCode * 59 + IsPickup.GetHashCode();
         }
         if (Categories != null)
         {
             hashCode = hashCode * 59 + Categories.GetHashCode();
         }
         if (IsTaxRemittedByDoordash != null)
         {
             hashCode = hashCode * 59 + IsTaxRemittedByDoordash.GetHashCode();
         }
         if (TaxAmountRemittedByDoordash != null)
         {
             hashCode = hashCode * 59 + TaxAmountRemittedByDoordash.GetHashCode();
         }
         if (CommissionType != null)
         {
             hashCode = hashCode * 59 + CommissionType.GetHashCode();
         }
         if (DeliveryShortCode != null)
         {
             hashCode = hashCode * 59 + DeliveryShortCode.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Product != null ? Product.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Quantity.GetHashCode();
         hashCode = (hashCode * 397) ^ Rate.GetHashCode();
         hashCode = (hashCode * 397) ^ TaxPercentage.GetHashCode();
         hashCode = (hashCode * 397) ^ DiscountPercentage.GetHashCode();
         hashCode = (hashCode * 397) ^ Total.GetHashCode();
         hashCode = (hashCode * 397) ^ Subtotal.GetHashCode();
         hashCode = (hashCode * 397) ^ Tax.GetHashCode();
         hashCode = (hashCode * 397) ^ LineIdx;
         return(hashCode);
     }
 }
Ejemplo n.º 3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (InvoiceId != null ? InvoiceId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ InvoiceNumber;
         hashCode = (hashCode * 397) ^ (InvoiceNumberAsString != null ? InvoiceNumberAsString.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Total.GetHashCode();
         hashCode = (hashCode * 397) ^ Subtotal.GetHashCode();
         hashCode = (hashCode * 397) ^ Tax.GetHashCode();
         hashCode = (hashCode * 397) ^ TaxPercentage.GetHashCode();
         hashCode = (hashCode * 397) ^ InvoiceDate.GetHashCode();
         hashCode = (hashCode * 397) ^ (ContractName != null ? ContractName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ PeriodStartDate.GetHashCode();
         hashCode = (hashCode * 397) ^ PeriodEndDate.GetHashCode();
         hashCode = (hashCode * 397) ^ (Currency != null ? Currency.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (From != null ? From.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (To != null ? To.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (LineItems?.Sum(x => x.GetHashCode()) ?? 0);
         return(hashCode);
     }
 }