public override IAsyncResult BeginDownloadXml(Uri feeduri, AsyncCallback callback) { try { var request = WebRequest.Create(feeduri) as HttpWebRequest; var requestState = new AsyncFeedRequestState { FeedUri = feeduri, OriginalRequest = request }; return request.BeginGetResponse(callback, requestState); } /* Usually this means we encountered a 404 / 501 error of some sort. */ catch (WebException ex) { throw new MissingFeedException(string.Format("Was unable to open web-hosted file {0}", feeduri.LocalPath), ex); } }
public override IAsyncResult BeginDownloadXml(Uri feeduri, AsyncCallback callback) { try { var request = WebRequest.Create(feeduri) as HttpWebRequest; var requestState = new AsyncFeedRequestState { FeedUri = feeduri, OriginalRequest = request }; return(request.BeginGetResponse(callback, requestState)); } /* Usually this means we encountered a 404 / 501 error of some sort. */ catch (WebException ex) { throw new MissingFeedException(string.Format("Was unable to open web-hosted file {0}", feeduri.LocalPath), ex); } }