Beispiel #1
0
        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);
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
 public void AddTask(TaskRunnerInformation task)
 {
     tasks.Add(task);
 }