Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 public void ToStream(IO.IndentedTextWriter s)
 {
     s.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}",
                 UsesRemaining.ToString(), TimesUsed.ToString(), ChargeCap.ToString(),
                 NextGrantTime.ToString(), InfiniteUses.ToString(), Recharging.ToString(),
                 SquadID.ToString("X8"));
 }