/// <summary> /// Executes all predictors against the provided Project and aggregates the results /// into one set of predictions. All paths in the final predictions are fully qualified /// paths, not relative to the directory containing the Project, since inputs and /// outputs could lie outside of that directory. /// </summary> /// <param name="projectInstance">The project instance to execute predictors against.</param> /// <returns>An object describing all predicted inputs and outputs.</returns> public ProjectPredictions PredictInputsAndOutputs(ProjectInstance projectInstance) { var projectPredictionCollector = new DefaultProjectPredictionCollector(); PredictInputsAndOutputs(projectInstance, projectPredictionCollector); return(projectPredictionCollector.Predictions); }
public DefaultProjectGraphPredictionCollector(ProjectGraph projectGraph) { IReadOnlyCollection <ProjectGraphNode> projectGraphNodes = projectGraph.ProjectNodes; var predictionsPerNode = new Dictionary <ProjectGraphNode, ProjectPredictions>(projectGraphNodes.Count); GraphPredictions = new ProjectGraphPredictions(predictionsPerNode); _collectorByProjectInstance = new Dictionary <ProjectInstance, DefaultProjectPredictionCollector>(projectGraphNodes.Count); foreach (ProjectGraphNode projectGraphNode in projectGraphNodes) { var collector = new DefaultProjectPredictionCollector(); predictionsPerNode.Add(projectGraphNode, collector.Predictions); _collectorByProjectInstance.Add(projectGraphNode.ProjectInstance, collector); } }