Example #1
0
 // returns first task in array that belong to object
 public MGD_Task GetTask(IMGD_TaskAgent taskAgent)
 {
     if (tasks.Count > 0)
     {
         MGD_Task obj = tasks.Find(item => item.TaskAgent == taskAgent);
         if (obj != null)
         {
             tasks.Remove(obj);
         }
         return(obj);
     }
     else
     {
         return(null);
     }
 }
Example #2
0
 // returns first task in array that has name as given
 public MGD_Task GetTask(TaskType taskType)
 {
     if (tasks.Count > 0)
     {
         MGD_Task obj = tasks.Find(item => item.taskType.Equals(taskType));
         if (obj != null)
         {
             tasks.Remove(obj);
         }
         return(obj);
     }
     else
     {
         return(null);
     }
 }
Example #3
0
 public void AddTask(MGD_Task task)
 {
     tasks.Add(task);
 }