private void EndGetResponseCallback(IAsyncResult ar) { try { this.m_response = this.m_request.EndGetResponse(ar); this.m_context.Response.ContentType = this.m_response.ContentType; var streamIn = this.m_response.GetResponseStream(); var streamOut = this.m_context.Response.OutputStream; var transfer = new AsyncTransfer(streamIn, streamOut); transfer.Completed += (sender, args) => this.OnCompleted(args.Error); transfer.StartAsync(); } catch(Exception ex) { this.OnCompleted(ex); } }
private void EndGetResponseCallback(IAsyncResult ar) { try { this.m_response = this.m_request.EndGetResponse(ar); this.m_context.Response.ContentType = this.m_response.ContentType; var streamIn = this.m_response.GetResponseStream(); var streamOut = this.m_context.Response.OutputStream; var transfer = new AsyncTransfer(streamIn, streamOut); transfer.Completed += (sender, args) => this.OnCompleted(args.Error); transfer.StartAsync(); } catch (Exception ex) { this.OnCompleted(ex); } }