Esempio n. 1
0
        public void AddTask(AbstractTask task)
        {
            if (_tasks.Count == TasksCount)
            {
                throw new InvalidOperationException("tasks capacity reached");
            }

            if (!task.CanBeAssignedToSelf)
            {
                throw new InvalidOperationException("this type of task can't be assigned");
            }

            _tasks.Add(task);
        }
Esempio n. 2
0
 public void RemoveTask(AbstractTask task)
 {
     _tasks.Remove(task);
 }