Example #1
0
        public AbstractTask GetNextTask(TaskBranch context, AbstractTask currentTask)
        {
            var result = context.GetKeyedTask(Key);
            if (result == null)
            {
                Log.WarnFormat("Could not locate task for key {0}", Key);
                result = context.GetNextTask(currentTask);
            }

            return result;
        }
Example #2
0
        public AbstractTask GetNextTask(AbstractTask task)
        {
            var index = GetTaskIndex(task);
            if (index == -1)
                return null;

            index++;

            return index > (Tasks.Count - 1) ? null : Tasks[index];
        }
Example #3
0
 public int GetTaskIndex(AbstractTask task)
 {
     return Tasks.IndexOf(task);
 }
Example #4
0
        public AbstractTask GetPreviousTask(AbstractTask task)
        {
            var index = GetTaskIndex(task);
            if (index == -1)
                return null;

            index--;

            return index < 0 ? null : Tasks[index];
        }
Example #5
0
 public AbstractTask GetNextTask(TaskBranch context, AbstractTask currentTask)
 {
     return context.GetNextTask(currentTask);
 }
Example #6
0
 public AbstractTask GetNextTask(TaskBranch context, AbstractTask currentTask)
 {
     return null;
 }
Example #7
0
        private bool IsForwardProgress(AbstractTask currentTask, AbstractTask lastTask)
        {
            var currentIndex = Tasks.IndexOf(currentTask);
            var lastIndex = Tasks.IndexOf(lastTask);

            return currentIndex >= lastIndex;
        }