Beispiel #1
0
 public AccountState Event(AccountCancelled occurred)
 {
     return(new AccountState(this.AccountNumber, this.CurrentBalance,
                             occurred.AccountStatus, this.Obligations,
                             SimulatedFields,
                             AuditLog.Add(new StateLog("AccountCancelled", occurred.UniqueGuid(), occurred.OccurredOn()))));
 }
 private AccountState ApplyEvent(AccountCancelled occurred)
 {
     return(new AccountState(AccountNumber,
                             CurrentBalance,
                             occurred.AccountStatus, Obligations,
                             SimulatedFields,
                             AuditLog.Add(new StateLog("AccountCancelled", occurred.Message, occurred.UniqueGuid(),
                                                       occurred.OccurredOn()))
                             , OpeningBalance,
                             Inventroy,
                             UserName,
                             LastPaymentAmount,
                             LastPaymentDate));
 }