public void Apply(CashDepositedEvent @event)
 {
     Balance += @event.Amount;
     if (Balance >= 0 && AccountState == Enumerations.AccountState.Blocked)
     {
         AccountState = Enumerations.AccountState.Actif;
     }
 }
Beispiel #2
0
 private void onDeposite(CashDepositedEvent cashDepositedEvent)
 {
     _ledgers.Add(new CreditMutation(cashDepositedEvent.Amount, new AccountNumber(string.Empty)));
     _balance = cashDepositedEvent.Balance;
 }