/// <summary> /// Custom constructor using a job repository, a step hander and a job execution. /// </summary> /// <param name="jobRepository"></param> /// <param name="stepHandler"></param> /// <param name="execution"></param> public JobFlowExecutor(IJobRepository jobRepository, IStepHandler stepHandler, JobExecution execution) { _jobRepository = jobRepository; _stepHandler = stepHandler; _execution = execution; _stepExecutionHolder.Value = null; }
public RequestHandler( TripleTriadDbContext context, IStepHandler <PlayCardStep> playCardHandler) { this.context = context; this.playCardHandler = playCardHandler; }
public static GameData ValidateAndRun <TStep>( this IStepHandler <TStep> handler, TStep step) where TStep : Step { handler.ValidateAndThrow(step); return(handler.Run(step)); }
public static GameData Run( this IStepHandler <CreateBoardStep> handler, GameData data) { var step = new CreateBoardStep(data); return(handler.ValidateAndRun(step)); }
public RequestHandler( TripleTriadDbContext context, IStepHandler <CoinTossStep> coinTossHandler, IStepHandler <CreateBoardStep> createBoardHandler) { this.context = context; this.coinTossHandler = coinTossHandler; this.createBoardHandler = createBoardHandler; }
public static GameData Run( this IStepHandler <CoinTossStep> handler, GameData data, string hostDispay, string challengerDisplay) { var step = new CoinTossStep(data, hostDispay, challengerDisplay); return(handler.ValidateAndRun(step)); }
public static GameData Run( this IStepHandler <PlayCardStep> handler, GameData data, string card, int tileId, bool isHost) { var step = new PlayCardStep(data, card, tileId, isHost); return(handler.ValidateAndRun(step)); }
public static GameData Run( this IStepHandler <SelectCardsStep> handler, GameData data, bool isHost, string playerDisplay, IEnumerable <string> cards) { var step = new SelectCardsStep(data, isHost, playerDisplay, cards); return(handler.ValidateAndRun(step)); }
/// <summary> /// Constructor /// </summary> /// <param name="stepDef"></param> public StepRuntime(StepDefinition stepDef, LinkRuntime[] outgoingLinks) { _stepDef = stepDef; OutLinks = outgoingLinks; switch (_stepDef.StepHandler.StepHandlerType) { case StepHandlerTypeEnum.None: _handler = new EmptyHandler(); break; case StepHandlerTypeEnum.IoC: _handler = new IoCServiceHandler(this); break; case StepHandlerTypeEnum.Task: _handler = new TaskServiceHandler(this); break; case StepHandlerTypeEnum.Script: _handler = new ScriptHandler(this); break; case StepHandlerTypeEnum.Service: _handler = new AsmLoadHandler(this); break; } }
public RequestHandler(TripleTriadDbContext context, IStepHandler <SelectCardsStep> selectCardHandler) { this.context = context; this.selectCardHandler = selectCardHandler; }