Пример #1
0
        static ScheduleService()
        {
            var scheduleSettings = ConfigurationManager.GetSection("ScheduleSettings") as ScheduleSettings;
            var jobAgents        = new List <JobAgent>();

            if (scheduleSettings.JobSettings != null)
            {
                jobAgents = scheduleSettings.JobSettings.OfType <JobSetting>().Select(j => new JobAgent(j.JobUrl, j.ServiceName, j.MethodName, j.Valus, j.Interval, scheduleSettings.CommonSetting.EffectHour, scheduleSettings.CommonSetting.ExpireHour, j.Name)).ToList();
            }

            scheduleCenter = new ScheduleCenter(jobAgents);
        }
Пример #2
0
 public TaskInfoController(ITaskInfoService service, ScheduleCenter scheduleCenter)
 {
     _service        = service;
     _scheduleCenter = scheduleCenter;
 }
Пример #3
0
 /// <summary>
 /// 构造函数注入IJobInfoAppService服务
 /// </summary>
 /// <param name="jobInfoAppService"></param>
 /// <param name="scheduleCenter"></param>
 public CreateModalModel(IJobInfoAppService jobInfoAppService, ScheduleCenter scheduleCenter)
 {
     _jobInfoAppService = jobInfoAppService;
     _scheduleCenter    = scheduleCenter;
 }
 public TaskInfoController(ScheduleCenter schedule, ITaskInfoService taskInfoService)
 {
     _scheduleCenter  = schedule;
     _taskInfoService = taskInfoService;
 }