Пример #1
0
 public override Money On(Timestamp time) =>
 time.CompareTo(this.ValidBefore) >= 0
         ? Amount.Zero(base.Currency)
         : this;
Пример #2
0
 public int CompareTo(Timestamp other) =>
 this.UtcTime.CompareTo(other.UtcTime);
Пример #3
0
 public int CompareTo(Timestamp other) =>
 - other.CompareTo(this.Value);
Пример #4
0
 public override Money On(Timestamp time) =>
 this;
Пример #5
0
 public Money PayableAt(Money money, Amount expense, Timestamp time) =>
 money is GiftCard gift && gift.ValidBefore.CompareTo(time) < 0 ? Amount.Zero(expense.Currency)
Пример #6
0
 public (Amount paid, Wallet remaining) Pay(Amount expense, Timestamp time) =>
 this.Moneys
Пример #7
0
 public BankCard CardOn(Timestamp time) =>
 time.CompareTo(this.ValidBefore) >= 0
         ? (BankCard) new CardExpired(this.ValidBefore)
         : this;
Пример #8
0
 public override Money On(Timestamp time) =>
 this.CardOn(time);