コード例 #1
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));
                                                                 }
                                                             });
 }
コード例 #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));
         }
     });
 }
 public void ProcessExternalMessage(IMessage message)
 {
     _async.Process(message, Result);
 }