Ejemplo n.º 1
0
        private string ProcessNextTask()
        {
            string[] taskData = null;

            try
            {
                taskData = PopTask();

                if (taskData == null)
                {
                    return(null);
                }

                var task    = taskData[0];
                var payload = taskData[1];

                var rh = new SimpleResultHandler(task, CompleteTask, FailTask);

                _taskHandler.Run(payload, rh);

                return(task);
            }
            catch (Exception ex)
            {
                OnException(ex);

                return(null); // might need examination, although null does indicate no task found
            }
        }
Ejemplo n.º 2
0
        private string ProcessNextTask()
        {
            string[] taskData = null;

            try
            {
                taskData = PopTask();

                if (taskData == null) return null;

                var task = taskData[0];
                var payload = taskData[1];

                var rh = new SimpleResultHandler(task, CompleteTask, FailTask);

                _taskHandler.Run(payload, rh);

                return task;

            }
            catch (Exception ex)
            {
                OnException(ex);

                return null; // might need examination, although null does indicate no task found
            }
        }