예제 #1
0
 public TaskDetail(string name, string group, ITask task, TaskTrigger trigger)
 {
     Name      = name;
     GroupName = group;
     Task      = task;
     Trigger   = trigger;
 }
예제 #2
0
        /// <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);
            }
        }
예제 #3
0
        /// <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);
            }
        }