protected void WhenStep(StepId id, Action <LambdaStepConfiguration <TContext> > config, Action <StepConfiguration <LambdaStep <TContext>, TContext> >?con = null) { var stepConfig = new LambdaStepConfiguration <TContext>(); config.Invoke(stepConfig); var concon = WhenStep(id, stepConfig.Build()); con?.Invoke(concon); }
protected void WhenStep(StepId id, Action <LambdaStepConfiguration <TContext> > config, Maybe <Action <StepConfiguration <LambdaStep <TContext>, TContext> > > mayStepConfig = default) { var stepConfig = new LambdaStepConfiguration <TContext>(); config.Invoke(stepConfig); var stepConfiguration = WhenStep(id, stepConfig.Build()); Do(from postStepConfig in mayStepConfig select Action(() => postStepConfig.Invoke(stepConfiguration))); }