Example #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);
        }
Example #2
0
 public void RemoveTask(AbstractTask task)
 {
     _tasks.Remove(task);
 }