public AssumptionChangesProvider(
     IProjectGraphRef graph,
     CommandExecutionData data)
 {
     _graph = graph;
     _data  = data;
 }
        public IEnumerable <string> DiscoverProjects(CommandExecutionData data)
        {
            var solution = SolutionFile.Parse(data.SolutionPath);

            return(solution.ProjectsInOrder
                   .Where(x => x.ProjectType != SolutionProjectType.SolutionFolder)
                   .Select(x => x.AbsolutePath)
                   .ToArray());
        }
Example #3
0
 public ChangesProviderRef(
     GitChangesProvider gitChangesProvider,
     AssumptionChangesProvider assumptionChangesProvider,
     CommandExecutionData data)
 {
     _gitChangesProvider        = gitChangesProvider;
     _assumptionChangesProvider = assumptionChangesProvider;
     _data = data;
 }
Example #4
0
        public ProjectGraphRef(
            CommandExecutionData executionData,
            IConsole console)
        {
            _executionData = executionData;
            _console       = console;

            // Discovering projects, and finding affected may throw
            // For error handling to be managed properly at the handler level,
            // we use Lazies so that its done on demand when its actually needed
            // instead of happening here on the constructor
            _graph = new Lazy <ProjectGraph>(BuildProjectGraph);
        }
Example #5
0
        public void Should_determine_output_dir_correctly(
            string repositoryPath,
            string outputDir,
            string expected)
        {
            var data = new CommandExecutionData(
                repositoryPath,
                String.Empty,
                string.Empty,
                string.Empty,
                false,
                Enumerable.Empty <string>(),
                new string[0],
                false,
                outputDir,
                string.Empty);

            Assert.Equal(expected, data.OutputDir);
        }
Example #6
0
        public void Should_determine_repository_path_correctly(
            string repositoryPath,
            string solutionPath,
            string expected)
        {
            var data = new CommandExecutionData(
                repositoryPath,
                solutionPath,
                string.Empty,
                string.Empty,
                false,
                Enumerable.Empty <string>(),
                new string[0],
                false,
                string.Empty,
                string.Empty);

            Assert.Equal(expected, data.RepositoryPath);
        }
 public IEnumerable <string> DiscoverProjects(CommandExecutionData data)
 {
     // TODO: Find *.*proj ?
     return(Directory.GetFiles(data.RepositoryPath, "*.csproj", SearchOption.AllDirectories)
            .ToArray());
 }