public IAsyncResult BeginParseIncomingMessage(AsyncCallback callback, object state)
 {
     IAsyncResult result2;
     bool flag = true;
     try
     {
         IAsyncResult result = new ParseMessageAsyncResult(this, callback, state);
         flag = false;
         result2 = result;
     }
     finally
     {
         if (flag)
         {
             this.Close();
         }
     }
     return result2;
 }
        public IAsyncResult BeginParseIncomingMessage(AsyncCallback callback, object state)
        {
            IAsyncResult result2;
            bool         flag = true;

            try
            {
                IAsyncResult result = new ParseMessageAsyncResult(this, callback, state);
                flag    = false;
                result2 = result;
            }
            finally
            {
                if (flag)
                {
                    this.Close();
                }
            }
            return(result2);
        }
        public Message EndParseIncomingMessage(IAsyncResult result, out Exception requestException)
        {
            Message message2;
            bool    flag = true;

            try
            {
                Message message = ParseMessageAsyncResult.End(result, out requestException);
                flag     = false;
                message2 = message;
            }
            finally
            {
                if (flag)
                {
                    this.Close();
                }
            }
            return(message2);
        }
Beispiel #4
0
 public IAsyncResult BeginParseIncomingMessage(HttpRequestMessage httpRequestMessage, AsyncCallback callback, object state)
 {            
     bool throwing = true;
     try
     {
         IAsyncResult result = new ParseMessageAsyncResult(httpRequestMessage, this, callback, state);
         throwing = false;
         return result;
     }
     finally
     {
         if (throwing)
         {
             Close();
         }
     }
 }