示例#1
0
 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)
         });
     }
 }
示例#2
0
        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));
 }
示例#4
0
 public void AddProject(Project project)
 {
     if (project == null) throw new ArgumentNullException("project");
     projects.Add(project.AssemblyName, project);
 }