コード例 #1
0
 public void StopResultPolling() {
   if (jobResultPoller != null && jobResultPoller.IsPolling) {
     refreshAutomatically = false;
     jobResultPoller.Stop();
     DeregisterResultPollingEvents();
     jobResultPoller = null;
   }
 }
コード例 #2
0
    public void StartResultPolling() {
      if (jobResultPoller == null) {
        jobResultPoller = new JobResultPoller(job.Id, Settings.Default.ResultPollingInterval);
        RegisterResultPollingEvents();
        jobResultPoller.AutoResumeOnException = false;
      }

      if (!jobResultPoller.IsPolling) {
        jobResultPoller.Start();
      }
    }
コード例 #3
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;
   }
 }