예제 #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));
        }
예제 #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;
 }
예제 #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;
 }