Ejemplo n.º 1
0
 public async Task Apply(TransferredEvent evt)
 {
     var targetAccount = this.GrainFactory.GetGrain <IAccount>(evt.DestinationAccountId);
     await targetAccount.Deposit(new DepositCommand(evt.Amount)
     {
         RelationEvent = evt.GetRelationKey()
     });
 }
Ejemplo n.º 2
0
 public void Handle(TransferredEvent @event)
 {
     this.Balance -= @event.Amount;
 }