private static void OnRead(IAsyncResult result)
 {
     if (!result.CompletedSynchronously)
     {
         bool flag;
         HttpInput.ParseMessageAsyncResult asyncState = (HttpInput.ParseMessageAsyncResult)result.AsyncState;
         Exception exception = null;
         try
         {
             flag = asyncState.ContinueReading(asyncState.inputStream.EndRead(result));
         }
         catch (Exception exception2)
         {
             if (Fx.IsFatal(exception2))
             {
                 throw;
             }
             flag      = true;
             exception = exception2;
         }
         if (flag)
         {
             asyncState.Complete(false, exception);
         }
     }
 }
 public static Message End(IAsyncResult result, out Exception requestException)
 {
     HttpInput.ParseMessageAsyncResult result2 = AsyncResult.End <HttpInput.ParseMessageAsyncResult>(result);
     requestException = result2.requestException;
     return(result2.message);
 }