public TaskDetail(string name, string group, ITask task, TaskTrigger trigger) { Name = name; GroupName = group; Task = task; Trigger = trigger; }
/// <summary> /// Schedule task using ITask object. /// </summary> /// <param name="name"></param> /// <param name="group"></param> /// <param name="trigger"></param> /// <param name="start"></param> /// <param name="task"></param> public void ScheduleTask(string name, string group, TaskTrigger trigger, bool start, ITask task) { TaskDetail taskDetail = new TaskDetail(name, group, task, trigger); lock (_syncObject) { InternalScheduleTask(taskDetail); } }
/// <summary> /// Schedules the specified task via a delegate. /// </summary> /// <param name="name"></param> /// <param name="group"></param> /// <param name="trigger"></param> /// <param name="start"></param> /// <param name="method"></param> public void ScheduleTask(string name, string group, TaskTrigger trigger, bool start, OnTaskExecute method) { TaskDetail taskDetail = new TaskDetail(name, group, null, trigger); taskDetail.IsTaskBased = false; taskDetail.TaskMethod = method; lock (_syncObject) { InternalScheduleTask(taskDetail); } }