Example #1
0
 /// <summary>
 /// Add a job to the collection.</summary>
 public void Add(AgentJob job)
 {
     List.Add(job);
 }
Example #2
0
 /// <summary>
 /// Remove a job from the collection.</summary>
 public void Remove(AgentJob job)
 {
     List.Remove(job);
 }
Example #3
0
        /// <summary>
        /// Initialize the job (call before the manager starts).</summary>
        public void Init(AgentJob job)
        {
            // check sequence number
            if (SequenceNumber <= 0)
                throw new ApplicationException("Sequence Number of a job component can not be 0");

            this.job = job;

            // reference the manager's global ignorable exception list
            _globalIgnorableExceptions = job.Manager.IgnorableExceptions;

            // initialize & hook up the backgroundworker
            backgroundWorker.WorkerReportsProgress = true;
            backgroundWorker.WorkerSupportsCancellation = true;
            backgroundWorker.DoWork += new DoWorkEventHandler(backgroundWorker_DoWork);
            backgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker_RunWorkerCompleted);
            backgroundWorker.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker_ProgressChanged);
        }