Beispiel #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 (PartnerOrderNumber != null)
         {
             hashCode = hashCode * 59 + PartnerOrderNumber.GetHashCode();
         }
         if (PlaceOrderTime != null)
         {
             hashCode = hashCode * 59 + PlaceOrderTime.GetHashCode();
         }
         if (Currency != null)
         {
             hashCode = hashCode * 59 + Currency.GetHashCode();
         }
         if (SubTotal != null)
         {
             hashCode = hashCode * 59 + SubTotal.GetHashCode();
         }
         if (TaxTotal != null)
         {
             hashCode = hashCode * 59 + TaxTotal.GetHashCode();
         }
         if (ShippingTotal != null)
         {
             hashCode = hashCode * 59 + ShippingTotal.GetHashCode();
         }
         if (Channel != null)
         {
             hashCode = hashCode * 59 + Channel.GetHashCode();
         }
         return(hashCode);
     }
 }