コード例 #1
0
 public AssumptionChangesProvider(
     IProjectGraphRef graph,
     CommandExecutionData data)
 {
     _graph = graph;
     _data  = data;
 }
コード例 #2
0
        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());
        }
コード例 #3
0
 public ChangesProviderRef(
     GitChangesProvider gitChangesProvider,
     AssumptionChangesProvider assumptionChangesProvider,
     CommandExecutionData data)
 {
     _gitChangesProvider        = gitChangesProvider;
     _assumptionChangesProvider = assumptionChangesProvider;
     _data = data;
 }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #7
0
 public IEnumerable <string> DiscoverProjects(CommandExecutionData data)
 {
     // TODO: Find *.*proj ?
     return(Directory.GetFiles(data.RepositoryPath, "*.csproj", SearchOption.AllDirectories)
            .ToArray());
 }