Exemplo n.º 1
0
        /// <summary>
        /// Adds dependency between tasks
        /// </summary>
        /// <param name="helper">TaskHelper</param>
        /// <param name="task">Helper Task</param>
        /// <param name="dependentTask">Helper Task</param>
        /// <example>
        /// <code>
        /// var bCleanTask = BuildCleanTask("Sln", true)
        ///   .Does(() => { "Clean Solution" });
        /// var bTask = BuildTask("Sln", true)
        ///   .Does(() => { "Build Solution" });
        /// TaskHelper.AddTaskDependency(bTask, bCleanTask);
        /// </code>
        /// </example>
        public static void AddTaskDependency(
            this IHelperTaskHandler helper,
            IHelperTask task,
            IHelperTask dependentTask)
        {
            if (dependentTask == null)
            {
                return;
            }

            helper.AddTaskDependency(task, dependentTask.TaskName);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds dependency between tasks
        /// </summary>
        /// <param name="helper">TaskHelper</param>
        /// <param name="task">Helper Task</param>
        /// <param name="dependentTaskName">Task name</param>
        public static void AddTaskDependency(
            this IHelperTaskHandler helper,
            IHelperTask task,
            string dependentTaskName)
        {
            if (task == null)
            {
                throw new ArgumentNullException(nameof(task));
            }

            helper.AddTaskDependency(task.GetTaskBuilder(), dependentTaskName);
        }