public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id.GetHashCode();
         hashCode = (hashCode * 397) ^ (Code != null ? Code.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Value.GetHashCode();
         hashCode = (hashCode * 397) ^ EndsAt.GetHashCode();
         hashCode = (hashCode * 397) ^ StartsAt.GetHashCode();
         hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ UsageLimit.GetHashCode();
         hashCode = (hashCode * 397) ^ AppliesToId.GetHashCode();
         hashCode = (hashCode * 397) ^ (DiscountType != null ? DiscountType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (AppliesTo != null ? AppliesTo.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (AppliesToResource != null ? AppliesToResource.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ TimesUsed.GetHashCode();
         hashCode = (hashCode * 397) ^ (Duration != null ? Duration.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ DurationUsageLimit.GetHashCode();
         hashCode = (hashCode * 397) ^ (AppliesToProductType != null ? AppliesToProductType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ CreatedAt.GetHashCode();
         hashCode = (hashCode * 397) ^ UpdatedAt.GetHashCode();
         hashCode = (hashCode * 397) ^ OncePerCustomer.GetHashCode();
         return(hashCode);
     }
 }
Exemple #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((StartsAt.GetHashCode() * 397) ^ EndsAt.GetHashCode());
     }
 }
Exemple #3
0
        public override int GetHashCode()
        {
            int hashCode = 955995587;

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

            return(hashCode);
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = StartsAt.GetHashCode();
         hashCode = (hashCode * 397) ^ UsageLimit.GetHashCode();
         hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ EndsAt.GetHashCode();
         return(hashCode);
     }
 }