Beispiel #1
0
        public static ProjectPredictions GetProjectPredictions(this IProjectPredictor predictor, ProjectInstance projectInstance)
        {
            var projectPredictionCollector = new DefaultProjectPredictionCollector();
            var predictionReporter         = new ProjectPredictionReporter(
                projectPredictionCollector,
                projectInstance,
                predictor.GetType().Name);

            predictor.PredictInputsAndOutputs(projectInstance, predictionReporter);
            return(projectPredictionCollector.Predictions);
        }
Beispiel #2
0
        public static ProjectPredictions GetProjectPredictions(this IProjectGraphPredictor predictor, string projectFile)
        {
            var graph                      = new ProjectGraph(projectFile, _globalProperties, new ProjectCollection());
            var entryPointNode             = graph.EntryPointNodes.Single();
            var projectPredictionCollector = new DefaultProjectPredictionCollector();
            var predictionReporter         = new ProjectPredictionReporter(
                projectPredictionCollector,
                entryPointNode.ProjectInstance,
                predictor.GetType().Name);

            predictor.PredictInputsAndOutputs(entryPointNode, predictionReporter);
            return(projectPredictionCollector.Predictions);
        }