/// <summary>
        /// Executes the specified task.
        /// </summary>
        /// <param name="task">The task to execute.</param>
        /// <param name="context">The context.</param>
        /// <returns>Returned Task</returns>
        public Task ExecuteAsync(CakeTask task, ICakeContext context)
        {
            if (task == null)
            {
                return(Task.CompletedTask);
            }

            if (_exclusiveTaskName != null && _exclusiveTaskName != task.Name)
            {
                _default.Skip(task, new CakeTaskCriteria(ctx => true, null));
                return(Task.CompletedTask);
            }
            return(_default.ExecuteAsync(task, context));
        }
Example #2
0
        private void SkipTask(ICakeContext context, IExecutionStrategy strategy, CakeTask task, CakeReport report)
        {
            PerformTaskSetup(context, strategy, task, true);
            strategy.Skip(task);
            PerformTaskTeardown(context, strategy, task, TimeSpan.Zero, true, false);

            report.AddSkipped(task.Name);
        }
Example #3
0
        private void SkipTask(ICakeContext context, IExecutionStrategy strategy, CakeTask task, CakeReport report, CakeTaskCriteria criteria)
        {
            PerformTaskSetup(context, strategy, task, true);
            strategy.Skip(task, criteria);
            PerformTaskTeardown(context, strategy, task, TimeSpan.Zero, true, false);

            // Add the skipped task to the report.
            report.AddSkipped(task.Name);
        }
Example #4
0
 internal void SkipTask(ICakeContext context, IExecutionStrategy strategy, CakeTask task)
 {
     PerformTaskSetup(context, strategy, task, true);
     strategy.Skip(task);
     PerformTaskTeardown(context, strategy, task, TimeSpan.Zero, true, false);
 }
Example #5
0
 private static void SkipTask(IExecutionStrategy strategy, CakeTask task)
 {
     strategy.Skip(task);
 }