Example #1
0
 public static IPipelineComponent <string, string> AddConsole <PIn>(this IPipelineComponent <PIn, string> component)
 {
     return(component.AddStep((s, context) =>
     {
         Console.WriteLine(s);
         return s;
     }));
 }
Example #2
0
 public static IPipelineComponent <Log, Log> AddLogFilter <PIn>(this IPipelineComponent <PIn, Log> component, Severity severity)
 {
     return(component.AddStep((log, context) =>
     {
         if (log.Severity < severity)
         {
             context.Break();
         }
         return log;
     }));
 }
Example #3
0
 public static IPipelineComponent <Log, string> AddLogFormatter <PIn>(this IPipelineComponent <PIn, Log> component, ILogFormatter formatter)
 {
     return(component.AddStep(formatter));
 }
Example #4
0
 public static IPipelineComponent <POut, NOut> AddStep <PIn, POut, NOut>(this IPipelineComponent <PIn, POut> component, Func <POut, IPipelineContext, NOut> step)
 {
     return(component.AddStep(PipelineComponent.CreatePipeline(step)));
 }