Exemplo n.º 1
0
 public void Handle(CommandDispatchFailedEvent evt)
 {
     if (AccountValueTranferring.CanHandle(evt))
     {
         var creating = sagas.GetById <AccountValueTranferring>(evt.Id);
         creating.Transition(evt);
         Save(creating, @by: evt);
     }
 }
Exemplo n.º 2
0
 void Apply(CommandDispatchFailedEvent evt)
 {
     Dispatch(new CancelAccountChange {
         Id = from, Reason = evt.ErrorMessage
     });
     Dispatch(new CancelAccountChange {
         Id = to, Reason = evt.ErrorMessage
     });
     failed = true;
     // Tranferring is failed
 }
Exemplo n.º 3
0
 public static bool CanHandle(CommandDispatchFailedEvent evt)
 {
     return(evt.CommandType == typeof(ChangeAccountValue).ToString());
 }