/// <summary> /// Initializes a new instance of the <see cref="TriggerContext"/> class. /// </summary> /// <param name="jobRunner"> /// The job runner. /// </param> /// <param name="job"> /// The job. /// </param> /// <param name="trigger"> /// The trigger. /// </param> public TriggerContext([NotNull] JobRunner jobRunner, IJob job, IJobTrigger trigger) { this.Logger = jobRunner.Logger; this.jobRunner = jobRunner; this.trigger = trigger; this.Job = job; }
internal static IJobTrigger MapCommonValues(JobTriggerDtoBase dto, IJobTrigger trigger) { trigger.Comment = dto.Comment; trigger.IsActive = dto.IsActive; trigger.Parameters = JsonConvert.SerializeObject(dto.Parameters); trigger.UserDisplayName = dto.UserDisplayName; trigger.UserId = dto.UserId; trigger.Deleted = dto.Deleted; return(trigger); }
internal static JobTriggerDtoBase MapCommonValues(IJobTrigger trigger, JobTriggerDtoBase dto) { dto.Id = trigger.Id; dto.Comment = trigger.Comment; dto.IsActive = trigger.IsActive; dto.Parameters = trigger.Parameters != null?JsonConvert.DeserializeObject(trigger.Parameters) : null; dto.UserDisplayName = trigger.UserDisplayName; dto.UserId = trigger.UserId; dto.Deleted = trigger.Deleted; return(dto); }
public int AddJob(IJob job, IJobTrigger jobTrigger) { lock (_addLock) { ++_jobId; var jobSchedule = new JobSchedule() { JobId = _jobId, Job = job, JobTrigger = jobTrigger }; _jobsToRunList.Add(jobSchedule); return(_jobId); } }
public ScheduleService(IFAMSScheduleFactory _factory, IJobTrigger _trigger, IScheduler SchedulerService) { factory = _factory; trigger = _trigger; _schedulerService = factory.CreateScheduler().Result; }
public void Setup() { _factory = new FAMSScheduleFactory(); _trigger = new PersonToSearchTrigger <PersonToSearchJob>(); _service = new ScheduleService(_factory, _trigger, _schedulerService); }
public void Setup() { _trigger = new PersonToSearchTrigger <PersonToSearchJob>(); }
/// <summary> /// Initializes a new instance of the <see cref="SerializableJobTrigger"/> class. /// </summary> /// <param name="trigger"> /// The trigger. /// </param> public SerializableJobTrigger([NotNull] IJobTrigger trigger) { this.Name = trigger.Name; }