public FilterBuilder <TBody> AddStepToExecute(Action <Integration> actionToExecute) { if (actionToExecute == null) { throw new ArgumentNullException(nameof(actionToExecute)); } this.StepsToExecute.Add(StepBuilderHelpers.FromLambda(actionToExecute)); return(this); }
public IntegrationFlowBuilder <TBody> EndChoice() { this.SourceFlow.AddStep(StepBuilderHelpers.FromLambda(async(x) => { var stepTriggered = false; var defaultStep = this.DefaultHandler; foreach (var step in this.GeneratedSteps) { if (step.Key(x)) { await step.Value.PerformStepExecutionAsync(x); stepTriggered = true; break; } } if (!stepTriggered && defaultStep != null) { await defaultStep.PerformStepExecutionAsync(x); } })); return(this.Builder); }
protected override ChoiceBuilder <TBody> EndChoiceAction() { this.Builder.AddStep(this.Matcher, StepBuilderHelpers.WrapMultipleSequentialSteps(this.StepsToExecute)); return(this.Builder); }
protected void AddStep(Action <Integration> action) { this.StepsToExecute.Add(StepBuilderHelpers.FromLambda(action)); }