/// <inheritdoc /> void IMoneyBank.Deduct(Money money) { if (money > CurrentAmount) { CurrentAmount = Money.None; Debug.Fail("Amount deducted was more than the amount allowed"); } else { CurrentAmount -= money; } AmountChanged.Notify(); }
/// <inheritdoc /> void IMoneyBank.Add(Money money) { CurrentAmount += money; AmountChanged.Notify(); }