void AddIncludedFiles(CodeDirectory currentDirectory, IFileInclusionHierarchy fileInclusionHierarchy, Project currentProject) { if (currentProject == null) return; foreach (var file in currentDirectory.Files.Where(x => fileInclusionHierarchy.ShouldInclude(x.FilePath))) { currentProject.AddFile(new ProjectFile { FullPath = file.FilePath, RelativePath = relativePathGenerator.GeneratePath(currentProject.Path, file.FilePath) }); } }
void AddFiles(Solution solution, CodeDirectory currentDirectory, IFileInclusionHierarchy fileInclusionHierarchy = null, Project currentProject = null) { fileInclusionHierarchy = UpdateFileInclusionPolicy(currentDirectory, fileInclusionHierarchy); if (currentDirectory.Project != null) { currentProject = solution.GetProject(currentDirectory.Project.AssemblyName); } AddIncludedFiles(currentDirectory, fileInclusionHierarchy, currentProject); currentDirectory.Directories.Each(x => AddFiles(solution, x, fileInclusionHierarchy, currentProject)); }
void FixReferencesForProject(Project project) { var absHintPaths = project.AssemblyReferences.Where(x => Path.IsPathRooted(x.HintPath)); absHintPaths.Each(x => x.HintPath = relativePathGenerator.GeneratePath(project.Path, x.HintPath)); }
public void AddProject(Project project) { if (project == null) throw new ArgumentNullException("project"); projects.Add(project.AssemblyName, project); }