private static void AsyncReceiveCompleteStatic(object state)
        {
            IAsyncResult result = (IAsyncResult)state;
            ReliableInputSessionChannel asyncState = (ReliableInputSessionChannel)result.AsyncState;

            try
            {
                if (asyncState.HandleReceiveComplete(result))
                {
                    asyncState.StartReceiving(true);
                }
            }
            catch (Exception exception)
            {
                if (Fx.IsFatal(exception))
                {
                    throw;
                }
                asyncState.ReliableSession.OnUnknownException(exception);
            }
        }
 private static void OnReceiveCompletedStatic(IAsyncResult result)
 {
     if (!result.CompletedSynchronously)
     {
         ReliableInputSessionChannel asyncState = (ReliableInputSessionChannel)result.AsyncState;
         try
         {
             if (asyncState.HandleReceiveComplete(result))
             {
                 asyncState.StartReceiving(true);
             }
         }
         catch (Exception exception)
         {
             if (Fx.IsFatal(exception))
             {
                 throw;
             }
             asyncState.ReliableSession.OnUnknownException(exception);
         }
     }
 }