public static IntegrationFlowBuilder <TBody> WireTap <TBody>(IBuildableFlow sourceFlow, IntegrationFlowBuilder <TBody> builder, IServiceProvider serviceProvider) { var wireTapStep = new WireTapStep(serviceProvider.GetRequiredService <ILoggerFactory>().CreateLogger <WireTapStep>()); sourceFlow.AddStep(wireTapStep); return(builder); }
public ExceptionHandlerBuilder(IBuildableFlow sourceFlow, IntegrationFlowBuilder <TBody> builder, IServiceProvider serviceProvider) { this.SourceFlow = sourceFlow ?? throw new ArgumentNullException(nameof(sourceFlow)); this.Builder = builder ?? throw new ArgumentNullException(nameof(builder)); this.ServiceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider)); this.ExceptionHander = new ExceptionHandler(this.ServiceProvider.GetRequiredService <ILogger <ExceptionHandler> >()); }
public static IntegrationFlowBuilder <TBody> Log <TBody>(IBuildableFlow sourceFlow, IntegrationFlowBuilder <TBody> builder, Action <Integration <TBody>, ILogger> action, IServiceProvider serviceProvider) { var logStep = new LogStep <TBody>(serviceProvider.GetRequiredService <ILoggerFactory>() .CreateLogger(typeof(LogStep <TBody>)), action); sourceFlow.AddStep(logStep); return(builder); }
public static FilterBuilder <TBody> Filter(Func <Integration, bool> filterFunction, IBuildableFlow sourceFlow, IntegrationFlowBuilder <TBody> builder) { if (filterFunction == null) { throw new ArgumentNullException(nameof(filterFunction)); } return(new FilterBuilder <TBody>() { FilterFunction = filterFunction, Builder = builder, SourceFlow = sourceFlow }); }
public ChoiceStepBuilder(IBuildableFlow sourceFlow, ChoiceBuilder <TBody> builder, Func <Integration, bool> matcher) : base(sourceFlow, builder, matcher) { }
private ChoiceBuilder(IBuildableFlow sourceFlow, IntegrationFlowBuilder <TBody> builder) { this.SourceFlow = sourceFlow; this.Builder = builder; }
public static ChoiceBuilder <TBody> Choice(IBuildableFlow sourceFlow, IntegrationFlowBuilder <TBody> builder) { return(new ChoiceBuilder <TBody>(sourceFlow, builder)); }
public static IntegrationFlowBuilder <TFrom> Translate(Func <TFrom, TTo> translator, IBuildableFlow sourceFlow, IntegrationFlowBuilder <TFrom> sourceBuilder) { var generatedStep = new TranslatorStep <TFrom, TTo>(translator); sourceFlow.AddStep(generatedStep); return(sourceBuilder); }
protected BaseChoiceStepBuilder(IBuildableFlow sourceFlow, ChoiceBuilder <TBody> builder, Func <Integration, bool> matcher) { this.SourceFlow = sourceFlow ?? throw new ArgumentNullException(nameof(sourceFlow)); this.Builder = builder ?? throw new ArgumentNullException(nameof(builder)); Matcher = matcher ?? throw new ArgumentNullException(nameof(matcher)); }