private void ScrapeThread() { try { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(_URL); Assembly myAssembly = Assembly.GetExecutingAssembly(); AssemblyName myAssemblyName = myAssembly.GetName(); request.UserAgent = "TorrentPatcher/" + myAssemblyName.Version; ScrapeInfo info = new ScrapeInfo(new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd()); _syncObject.Invoke(new dCallback(ThreadCallBack), new object[] { _index, info }); } catch { Thread.CurrentThread.Abort(); } }
private void ThreadCallBack(int index, ScrapeInfo scrape) { _Callback(index, scrape, this); }