Ejemplo n.º 1
0
        public void MoveDown(ITask task)
        {
            int index = TasksList.IndexOf(task);

            if (index < 0)
            {
                throw new KeyNotFoundException($"The status detail Id: {task.TaskId} is not found in the task list");
            }

            if (index < TasksList.Count - 1)
            {
                TasksList.Swap(index, index + 1);
            }
        }
Ejemplo n.º 2
0
        public void MoveUp(ITask task)
        {
            int index = TasksList.IndexOf(task);

            if (index < 0)
            {
                throw new KeyNotFoundException($"The task Id: {task.TaskId} is not found in the task list");
            }

            if (index > 0)
            {
                TasksList.Swap(index, index - 1);
            }
        }