Ejemplo n.º 1
0
        public override int GetHashCode()
        {
            var hashCode = 77621969;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Id);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(PriceFileId);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ExternalRefId);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ProductId);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(PartId);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Sku);

            hashCode = hashCode * -1521134295 + PriceNet.GetHashCode();
            hashCode = hashCode * -1521134295 + PriceNetFull.GetHashCode();
            hashCode = hashCode * -1521134295 + PriceRetail.GetHashCode();
            hashCode = hashCode * -1521134295 + PriceRetailFull.GetHashCode();
            hashCode = hashCode * -1521134295 + DateStart.GetHashCode();
            hashCode = hashCode * -1521134295 + DateEnd.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(PromoCode);

            hashCode = hashCode * -1521134295 + EqualityComparer <long?> .Default.GetHashCode(Priority);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Note);

            return(hashCode);
        }
Ejemplo n.º 2
0
 public override int GetHashCode()
 {
     {
         var hashCode = DateStart.GetHashCode();
         hashCode = (hashCode * 397) ^ (TriggerId.GetHashCode());
         hashCode = (hashCode * 397) ^ ((int)RepeatType);
         hashCode = (hashCode * 397) ^ (ConsumerNotificationSettingIds != null ? ConsumerNotificationSettingIds.Sum() + ConsumerNotificationSettingIds.Count() : 0);
         return(hashCode);
     }
 }
Ejemplo n.º 3
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 (DateStart != null)
         {
             hashCode = hashCode * 59 + DateStart.GetHashCode();
         }
         if (DateEnd != null)
         {
             hashCode = hashCode * 59 + DateEnd.GetHashCode();
         }
         return(hashCode);
     }
 }