Пример #1
0
 public void Dispose() {
   if (jobDownloader != null) {
     jobDownloader.ExceptionOccured -= new EventHandler<EventArgs<Exception>>(jobDownloader_ExceptionOccured);
     jobDownloader.Dispose();
     jobDownloader = null;
   }
   if (jobResultPoller != null) {
     DeregisterResultPollingEvents();
     jobResultPoller = null;
   }
   if (hiveTasks != null) {
     DisposeTasks();
   }
   if (job != null) {
     DeregisterJobEvents();
     job = null;
   }
 }
Пример #2
0
 public void Dispose()
 {
     taskDownloader.ExceptionOccured -= new EventHandler <EventArgs <Exception> >(taskDownloader_ExceptionOccured);
     resultsLock.Dispose();
     taskDownloader.Dispose();
 }