public async Task <List <TaskRunnerInformation> > FindTasks( IWorkspaceFileObject workspaceFileObject, HashSet <FilePath> filesAdded) { List <TaskRunnerInformation> foundTasks = null; foreach (FilePath configFile in GetFiles(workspaceFileObject)) { if (!filesAdded.Contains(configFile)) { ITaskRunner runner = taskRunnerProvider.GetTaskRunner(configFile); if (runner != null) { ITaskRunnerConfig config = await runner.ParseConfig(null, configFile); var info = new TaskRunnerInformation(workspaceFileObject, config, runner.Options, configFile); if (foundTasks == null) { foundTasks = new List <TaskRunnerInformation> (); } foundTasks.Add(info); filesAdded.Add(configFile); } } } return(foundTasks); }
async Task AddTaskRunner(ITaskRunner runner, FilePath configFile, Project project) { ITaskRunnerConfig config = await runner.ParseConfig(null, configFile); var info = new TaskRunnerInformation(project, config, runner.Options, configFile); var groupedTask = GetGroupedTask(project); if (groupedTask == null) { groupedTask = new GroupedTaskRunnerInformation(project); groupedTasks = groupedTasks.Add(groupedTask); } groupedTask.AddTask(info); OnTasksChanged(); }
public void AddTask(TaskRunnerInformation task) { tasks.Add(task); }