Example #1
0
 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();
     }
 }
Example #2
0
 private void ThreadCallBack(int index, ScrapeInfo scrape)
 {
     _Callback(index, scrape, this);
 }