Exemplo n.º 1
0
        /// <summary>
        /// Process the response callback from a POX method call.
        /// </summary>
        /// <param name="ar">The async result object.</param>
        private void ResponseCallback(IAsyncResult ar)
        {
            RequestData            data     = (RequestData)ar.AsyncState;
            HttpWebRequest         request  = data.Request;
            HttpWebResponse        response = (HttpWebResponse)request.EndGetResponse(ar);
            Action <ServiceResult> callback = data.Callback;
            WebServiceResult       wsr      = data.ConvertToResult(response);

            wsr.ReadHttpWebResponse();

            _sync.Post(UserInterfaceThreadCallback, new CrossThreadState(callback, wsr));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new TemporaryStateObject object.
 /// </summary>
 /// <param name="callback">The callback action.</param>
 /// <param name="result">The result object.</param>
 public CrossThreadState(Action <ServiceResult> callback, WebServiceResult result)
 {
     Callback = callback;
     Result   = result;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new TemporaryStateObject object.
 /// </summary>
 /// <param name="callback">The callback action.</param>
 /// <param name="result">The result object.</param>
 public CrossThreadState(Action<ServiceResult> callback, WebServiceResult result)
 {
     Callback = callback;
     Result = result;
 }