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); }
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); }
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); }