public static EventActivityBinder <TInstance> Schedule <TInstance, TMessage>(this EventActivityBinder <TInstance> source, Schedule <TInstance, TMessage> schedule, EventMessageFactory <TInstance, TMessage> messageFactory, Action <SendContext> contextCallback, ScheduleDelayProvider <TInstance> delayProvider) where TInstance : class, SagaStateMachineInstance where TMessage : class { return(source.Add(new ScheduleActivity <TInstance, TMessage>(messageFactory, schedule, contextCallback, delayProvider))); }
public FaultedScheduleActivity(EventExceptionMessageFactory <TInstance, TData, TException, TMessage> messageFactory, Schedule <TInstance, TMessage> schedule, ScheduleDelayProvider <TInstance, TData, TException> delayProvider) { _messageFactory = messageFactory; _schedule = schedule; _delayProvider = delayProvider; _sendPipe = Pipe.Empty <SendContext>(); }
public ScheduleActivity(EventMessageFactory <TInstance, TMessage> messageFactory, Schedule <TInstance> schedule, Action <SendContext> contextCallback, ScheduleDelayProvider <TInstance> delayProvider) { _messageFactory = messageFactory; _schedule = schedule; _delayProvider = delayProvider; _sendPipe = Pipe.Execute(contextCallback); }
public ScheduleActivity(EventMessageFactory <TInstance, TMessage> messageFactory, Schedule <TInstance> schedule, ScheduleDelayProvider <TInstance> delayProvider) { _messageFactory = messageFactory; _schedule = schedule; _delayProvider = delayProvider; _sendPipe = Pipe.Empty <SendContext>(); }
public static EventActivityBinder <TInstance, TData> Schedule <TInstance, TData, TMessage>( this EventActivityBinder <TInstance, TData> source, Schedule <TInstance, TMessage> schedule, TMessage message, ScheduleDelayProvider <TInstance, TData> delayProvider) where TInstance : class, SagaStateMachineInstance where TData : class where TMessage : class { return(source.Add(new ScheduleActivity <TInstance, TData, TMessage>(x => message, schedule, delayProvider))); }
public static ExceptionActivityBinder <TInstance, TData, TException> Schedule <TInstance, TData, TException, TMessage>( this ExceptionActivityBinder <TInstance, TData, TException> source, Schedule <TInstance, TMessage> schedule, TMessage message, Action <SendContext> contextCallback, ScheduleDelayProvider <TInstance, TData, TException> delayProvider) where TInstance : class, SagaStateMachineInstance where TData : class where TException : Exception where TMessage : class { return(source.Add(new FaultedScheduleActivity <TInstance, TData, TException, TMessage>(x => message, schedule, contextCallback, delayProvider))); }
public static EventActivityBinder <TInstance> Schedule <TInstance, TMessage>(this EventActivityBinder <TInstance> source, Schedule <TInstance, TMessage> schedule, AsyncEventMessageFactory <TInstance, TMessage> messageFactory, ScheduleDelayProvider <TInstance> delayProvider, Action <SendContext <TMessage> > contextCallback = null) where TInstance : class, SagaStateMachineInstance where TMessage : class { DateTime TimeProvider(ConsumeEventContext <TInstance> context) { return(DateTime.UtcNow + delayProvider(context)); } return(source.Add(new ScheduleActivity <TInstance, TMessage>(messageFactory, schedule, TimeProvider, contextCallback))); }