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}'"); }
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}'"); }
private void SearchFakesConfigurationFiles() { var fakesPath = Path.Combine(ProjectDirectory, "Fakes"); if (!Directory.Exists(fakesPath)) { return; } var files = Directory.GetFiles(fakesPath, "*.fakes"); foreach (var file in files) { FoundFakesConfiguration.Add(file); } }