/// <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)); }
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); }
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); }
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); }
private static void SkipTask(IExecutionStrategy strategy, CakeTask task) { strategy.Skip(task); }