public virtual Task OnRunCompletedAsync(bool succeeded, SessionRunResult <TIdentifier> sessionRunResult, Exception exception) { _ = succeeded; _ = sessionRunResult; _ = exception; if (succeeded) { taskRunnerLogger.LogInformation($"Run completed without exception."); } else { taskRunnerLogger.LogError($"Error(s) occured during run"); } return(Task.CompletedTask); }
public async Task <string> GetFailingPrecondition(ITaskDefinition <TIdentifier> taskDefinition, ImmutableList <TaskPrecondition <TIdentifier> > preconditions) { var taskPreconditions = preconditions.Where(a => a.TaskName.Equals(taskDefinition.Name, StringComparison.InvariantCulture)).ToImmutableList(); if (taskPreconditions == null || taskPreconditions.Count == 0) { taskRunnerLogger.LogInformation($"Found no preconditions for task '{taskDefinition.Name}'"); return(string.Empty); } else { if (taskDefinition.OnBeforePreconditionEvaluation != null) { taskPreconditions = taskDefinition.OnBeforePreconditionEvaluation(taskPreconditions); } taskRunnerLogger.LogInformation($"Found {taskPreconditions.Count} preconditions for task '{taskDefinition.Name}'"); return(await GetEvaluationResult(taskDefinition, taskPreconditions)); } }