コード例 #1
0
        public void Process()
        {
            if (!Directory.Exists(FolderPath))
            {
                Warning($"'{FolderPath}' is missing.");
                return;
            }

            EmptyLine();
            Info($"Started working with the folder '{FolderPath}'");
            var projects = Directory.GetFiles(FolderPath, FileExtensions.ProjectSearchPattern, SearchOption.AllDirectories);

            Info($"Found {projects.Length} projects.");
            foreach (var project in projects)
            {
                var strategy = new ProjectTarget(project);
                strategy.Process();
                foreach (var config in strategy.FoundFakesConfiguration)
                {
                    FoundFakesConfiguration.Add(config);
                }
            }

            Info($"Stop working with the folder '{FolderPath}'");
        }
コード例 #2
0
        public void Process()
        {
            EmptyLine();
            Info($"Start processing the solution '{SolutionFilePath}'");
            if (!FileIsSolution())
            {
                return;
            }

            if (!SolutionExists())
            {
                return;
            }

            var solution = SolutionParser.Parse(SolutionFilePath);
            var projects = solution.Projects.ToArray();

            foreach (var project in projects)
            {
                Info($"Found project: {project.Name} on {project.Path}");
                var projectStrategy = new ProjectTarget(GetFullPath(project.Path));
                projectStrategy.Process();
                foreach (var config in projectStrategy.FoundFakesConfiguration)
                {
                    FoundFakesConfiguration.Add(config);
                }
            }

            Info($"Stop processing the solution '{SolutionFilePath}'");
        }