public void StopResultPolling() {
   if (jobResultPoller != null && jobResultPoller.IsPolling) {
     refreshAutomatically = false;
     jobResultPoller.Stop();
     DeregisterResultPollingEvents();
     jobResultPoller = null;
   }
 }
    public void StartResultPolling() {
      if (jobResultPoller == null) {
        jobResultPoller = new JobResultPoller(job.Id, Settings.Default.ResultPollingInterval);
        RegisterResultPollingEvents();
        jobResultPoller.AutoResumeOnException = false;
      }

      if (!jobResultPoller.IsPolling) {
        jobResultPoller.Start();
      }
    }
 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;
   }
 }