Beispiel #1
0
        /// <summary>
        /// Creates and starts task for one of the batch inputs.
        /// </summary>
        private void RunBatchTask(IGisTool tool)
        {
            var task = new GisTask(tool);

            _context.Tasks.Add(task);

            task.RunAsync();
        }
        /// <summary>
        /// Creates sequentially linked tasks for a list of tools.
        /// </summary>
        public static IEnumerable <IGisTask> CreateSequentialTasks(IEnumerable <IGisTool> tools)
        {
            IGisTask lastTask = null;

            foreach (var t in tools.Reverse())
            {
                var task = new GisTask(t)
                {
                    NextTask = lastTask
                };

                lastTask = task;

                yield return(task);
            }
        }