예제 #1
0
        /// <inheritdoc/>
        public void AddJob(IJob jobObject, JobStartType startType = JobStartType.Immediate)
        {
            if (this.IsJobRegistered(jobObject.GetType()))
            {
                return; // Job is already added
            }
            var ji = new JobExecutionInfo(jobObject, startType, new object[0]);

            this.m_jobs.Add(ji);
            if (startType == JobStartType.Immediate)
            {
                this.m_threadPool.QueueUserWorkItem(this.RunJob, ji);
            }
        }
예제 #2
0
 /// <summary>
 /// Add a job to the job manager
 /// </summary>
 public void AddJob(IJob jobType, JobStartType jobStartType = JobStartType.Immediate)
 {
     // Not supported
 }
예제 #3
0
 /// <summary>
 /// Add a job to the job manager
 /// </summary>
 public void AddJob(IJob jobType, TimeSpan elapseTime, JobStartType jobStartType = JobStartType.Immediate)
 {
     // Not supported
 }
예제 #4
0
 /// <summary>
 /// Start the job
 /// </summary>
 public JobExecutionInfo(IJob job, JobStartType startType, Object[] parameters)
 {
     this.Job        = job;
     this.StartType  = startType;
     this.Parameters = parameters;
 }
예제 #5
0
 /// <inheritdoc/>
 public void AddJob(IJob jobObject, TimeSpan interval, JobStartType startType = JobStartType.Immediate)
 {
     this.AddJob(jobObject, startType);
     this.SetJobSchedule(jobObject, interval);
 }