private static void OnComposeAsyncOperationsComplete(IAsyncResult result)
 {
     if (!result.CompletedSynchronously)
     {
         ReliableChannelCloseAsyncResult asyncState = (ReliableChannelCloseAsyncResult)result.AsyncState;
         bool      flag      = false;
         Exception exception = null;
         try
         {
             flag = asyncState.CompleteComposeAsyncOperations(result);
         }
         catch (Exception exception2)
         {
             if (Fx.IsFatal(exception2))
             {
                 throw;
             }
             exception = exception2;
         }
         if (flag || (exception != null))
         {
             asyncState.Complete(false, exception);
         }
     }
 }
 private static void OnBinderCloseComplete(IAsyncResult result)
 {
     if (!result.CompletedSynchronously)
     {
         ReliableChannelCloseAsyncResult asyncState = (ReliableChannelCloseAsyncResult)result.AsyncState;
         Exception exception = null;
         try
         {
             asyncState.binder.EndClose(result);
         }
         catch (Exception exception2)
         {
             if (Fx.IsFatal(exception2))
             {
                 throw;
             }
             exception = exception2;
         }
         asyncState.Complete(false, exception);
     }
 }