Esempio n. 1
0
 private static void OnFinalizeCorrelationCompletedCallback(IAsyncResult result)
 {
     if (!result.CompletedSynchronously)
     {
         bool flag;
         ContextChannelRequestContext.ReplyAsyncResult asyncState = (ContextChannelRequestContext.ReplyAsyncResult)result.AsyncState;
         Exception exception = null;
         try
         {
             flag = asyncState.OnFinalizeCorrelationCompleted(result);
         }
         catch (Exception exception2)
         {
             if (Fx.IsFatal(exception2))
             {
                 throw;
             }
             exception = exception2;
             flag      = true;
         }
         if (flag)
         {
             asyncState.Complete(false, exception);
         }
     }
 }
Esempio n. 2
0
 private static void OnReplyCompletedCallback(IAsyncResult result)
 {
     if (!result.CompletedSynchronously)
     {
         ContextChannelRequestContext.ReplyAsyncResult asyncState = (ContextChannelRequestContext.ReplyAsyncResult)result.AsyncState;
         Exception exception = null;
         try
         {
             asyncState.OnReplyCompleted(result);
         }
         catch (Exception exception2)
         {
             if (Fx.IsFatal(exception2))
             {
                 throw;
             }
             exception = exception2;
         }
         asyncState.Complete(false, exception);
     }
 }