public AsyncWrapperOperation(IAsynchronizer asyncer, IOperation operationToWrap)
 {
     _asyncer = asyncer;
     this.Name = operationToWrap.Name;
     this.Implementation = (input, continueWith, unhandledException) =>
                                         asyncer.Process(input,
                                                         output =>
                                                             {
                                                                 try
                                                                 {
                                                                     operationToWrap.Implementation(output, continueWith, unhandledException);
                                                                 }
                                                                 catch (Exception ex)
                                                                 {
                                                                     unhandledException(new FlowRuntimeException(ex, output));
                                                                 }
                                                             });
 }
Пример #2
0
 public AsyncWrapperOperation(IAsynchronizer asyncer, IOperation operationToWrap)
 {
     _asyncer            = asyncer;
     this.Name           = operationToWrap.Name;
     this.Implementation = (input, continueWith, unhandledException) =>
                           asyncer.Process(input,
                                           output =>
     {
         try
         {
             operationToWrap.Implementation(output, continueWith, unhandledException);
         }
         catch (Exception ex)
         {
             unhandledException(new FlowRuntimeException(ex, output));
         }
     });
 }