Esempio n. 1
0
 public PipeMiddle(Action <TIn, Action <TOut> > handler)
 {
     _impl = input =>
     {
         try
         {
             handler(input, _Notify);
         }
         catch (Exception err)
         {
             _Err(err);
         }
     };
     _nodeDisplay = new NodeDisplay(_Format(handler.Method));
 }
Esempio n. 2
0
 public PipeSource(Action <TIn, Action <TOut> > handler)
 {
     _impl = input =>
     {
         try
         {
             handler(input, _Notify);
         }
         catch (Exception err)
         {
             _Err(err);
             return;
         }
         _Finish();
     };
     _nodeDisplay = new NodeDisplay(_Format(handler.Method));
 }
Esempio n. 3
0
 public PipeMiddle(Func <TIn, TOut> handler)
 {
     _impl = input =>
     {
         TOut result;
         try
         {
             result = handler(input);
         }
         catch (Exception err)
         {
             _Err(err);
             return;
         }
         _Notify(result);
     };
     _nodeDisplay = new NodeDisplay(_Format(handler.Method));
 }
Esempio n. 4
0
 public ScatterImpl(Func <TIn, List <TOut> > handler)
 {
     _impl = input =>
     {
         List <TOut> result;
         try
         {
             result = handler(input);
         }
         catch (Exception err)
         {
             _Err(err);
             return;
         }
         foreach (var val in result)
         {
             _Notify(val);
         }
     };
     _nodeDisplay = new NodeDisplay($"Scatter({_Format(handler.Method)})");
 }