private void html_DownloadAsyncCompleted(DownloadClient <XDocument> sender, DownloadCompletedEventArgs <XDocument> e) { sender.AsyncDownloadCompleted -= this.html_DownloadAsyncCompleted; AsyncArgs args = (AsyncArgs)e.UserArgs; this.ConvertHtml(e.Response.Result, args); this.UploadAsync2(args); }
private void dl_DownloadAsyncCompleted(DownloadClient <System.IO.Stream> sender, DownloadCompletedEventArgs <System.IO.Stream> e) { sender.AsyncDownloadCompleted -= this.dl_DownloadAsyncCompleted; XDocument doc = null; if (e.Response.Result != null) { doc = MyHelper.ParseXmlDocument(e.Response.Result); } if (this.AsyncUploadCompleted != null) { this.AsyncUploadCompleted(this, ((DefaultDownloadCompletedEventArgs <System.IO.Stream>)e).CreateNew(doc)); } }