Exemplo n.º 1
0
 public static DataEventAction <T, TData> RetryLater <T, TData>(this DataEventAction <T, TData> eventAction)
     where T : SagaStateMachine <T>, ISaga
     where TData : class
 {
     eventAction.Call((saga, message) => ContextStorage.MessageContext <TData>().RetryLater());
     return(eventAction);
 }
Exemplo n.º 2
0
 public static DataEventAction <T, TData> RespondWith <T, TData, TMessage>(this DataEventAction <T, TData> eventAction, Func <T, TData, TMessage> action)
     where T : SagaStateMachine <T>, ISaga
     where TData : class
     where TMessage : class
 {
     eventAction.Call((saga, message) => CurrentMessage.Respond(action(saga, message)));
     return(eventAction);
 }
Exemplo n.º 3
0
 public static DataEventAction <T, TData> Publish <T, TData, TMessage>(this DataEventAction <T, TData> eventAction, Func <T, TData, TMessage> action)
     where T : SagaStateMachine <T>, ISaga
     where TData : class
     where TMessage : class
 {
     eventAction.Call((saga, message) => saga.Bus.Publish(action(saga, message)));
     return(eventAction);
 }