Ejemplo n.º 1
0
        private void RaiseRequestOk(RequestState requestState)
        {
            Response response = new Response(requestState.HttpWebResponse.StatusCode, requestState.HttpWebResponse.StatusDescription,
                requestState.HttpWebResponse.Headers, requestState.ResponseMemoryStream.ToArray());

            requestState.RaiseRequestCompelete(requestState, new RequestCompeleteEventArgs(response));
        }
Ejemplo n.º 2
0
        private void RaiseRequestException(RequestState requestState, WebException webEx, Exception ex)
        {
            RequestCompeleteEventArgs e = new RequestCompeleteEventArgs(true);
            if(webEx != null)
            {
                e.WebError = webEx;
            }
            if (ex != null)
            {
                e.ExtraError = ex;
            }

            requestState.RaiseRequestCompelete(requestState, e);
        }