Example #1
0
        public override int GetHashCode()
        {
            var hashCode = -2019929811;

            hashCode = hashCode * -1521134295 + ProductCode.GetHashCode();
            hashCode = hashCode * -1521134295 + ProductType.GetHashCode();

            return(hashCode);
        }
Example #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (ProductCode != null ? ProductCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ContractMonth;
         hashCode = (hashCode * 397) ^ ContractYear;
         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 (DiscountAmount != null)
         {
             hashCode = hashCode * 59 + DiscountAmount.GetHashCode();
         }
         if (GoogleProductCategoryId != null)
         {
             hashCode = hashCode * 59 + GoogleProductCategoryId.GetHashCode();
         }
         if (LineAmountTotal != null)
         {
             hashCode = hashCode * 59 + LineAmountTotal.GetHashCode();
         }
         if (ProductCategory != null)
         {
             hashCode = hashCode * 59 + ProductCategory.GetHashCode();
         }
         if (ProductCode != null)
         {
             hashCode = hashCode * 59 + ProductCode.GetHashCode();
         }
         if (ProductName != null)
         {
             hashCode = hashCode * 59 + ProductName.GetHashCode();
         }
         if (ProductPrice != null)
         {
             hashCode = hashCode * 59 + ProductPrice.GetHashCode();
         }
         if (ProductType != null)
         {
             hashCode = hashCode * 59 + ProductType.GetHashCode();
         }
         if (Quantity != null)
         {
             hashCode = hashCode * 59 + Quantity.GetHashCode();
         }
         if (TaxAmount != null)
         {
             hashCode = hashCode * 59 + TaxAmount.GetHashCode();
         }
         if (Unit != null)
         {
             hashCode = hashCode * 59 + Unit.GetHashCode();
         }
         return(hashCode);
     }
 }
Example #4
0
 public override int GetHashCode() =>
 (ProductCode != null ? ProductCode.GetHashCode() : 0);