Beispiel #1
0
        private int GetNextListTaskId(List <TasksOfItemList> tasksPerList, TasksOfItemList current)
        {
            var nextInd = tasksPerList.IndexOf(current) + 1;

            if (nextInd < tasksPerList.Count)
            {
                if (tasksPerList[nextInd].Tasks.Count == 1)
                {
                    logger.Debug("next list task id = {0}", tasksPerList[nextInd].Tasks[0].ID);
                    return(tasksPerList[nextInd].Tasks[0].ID);
                }
                else if (tasksPerList[nextInd].Tasks.Count == 0)
                {
                    // no task in xml for that list, skip
                    return(GetNextListTaskId(tasksPerList, tasksPerList[nextInd]));
                }
                else
                {
                    logger.Debug("not single task for list {0}", tasksPerList[nextInd].List.Name);
                    return(int.MaxValue);
                }
            }
            else
            {
                return(int.MaxValue);
            }
        }
Beispiel #2
0
 private int GetNextListTaskId(List<TasksOfItemList> tasksPerList, TasksOfItemList current)
 {
     var nextInd = tasksPerList.IndexOf(current) + 1;
     if (nextInd < tasksPerList.Count)
     {
         if (tasksPerList[nextInd].Tasks.Count == 1)
         {
             logger.Debug("next list task id = {0}", tasksPerList[nextInd].Tasks[0].ID);
             return tasksPerList[nextInd].Tasks[0].ID;
         }
         else if (tasksPerList[nextInd].Tasks.Count == 0)
         {
             // no task in xml for that list, skip
             return GetNextListTaskId(tasksPerList, tasksPerList[nextInd]);
         }
         else
         {
             logger.Debug("not single task for list {0}", tasksPerList[nextInd].List.Name);
             return int.MaxValue;
         }
     }
     else
     {
         return int.MaxValue;
     }
 }