Exemplo n.º 1
0
 public override void UpdateState(IDomainEvent domainEvent)
 {
     domainEvent.Match()
     .With <V2.ModifiedBalance>(modified => State.Balance += modified.Delta)
     .With <V1.TransferCreated>(created => State.PendingTransactions.Add(created.TransferId))
     .With <V1.TransferFinished>(created => State.PendingTransactions.Remove(created.TransferId));
 }
Exemplo n.º 2
0
 protected override void UpdateState(IDomainEvent domainEvent)
 {
     domainEvent?.Match()
     .With <SetLocationInRegion>(c => UpdateSetLocation(c));
 }