예제 #1
0
        private void AddProjectAndReferences(Proj project)
        {
            if (project != null)
            {
                AddProject(project);

                IncludeEfferentProjectReferences(project);

                if (options.SkipReferences)
                {
                    IncludeEfferentAssemblyReferences(project);
                }
            }
        }
예제 #2
0
        private void AddReferencingProjects(Proj project)
        {
            if (project != null)
            {
                List <Proj> afferentAssemblyReferences = projectsList.FindAll(
                    csp => csp.ReferencedAssemblyNames.Contains(project.AssemblyName));

                AddAfferentReferences(afferentAssemblyReferences);

                List <Proj> afferentProjectReferences =
                    projectsList.FindAll(csp => csp.ReferencedProjectGuids.Contains(project.Guid));

                AddAfferentReferences(afferentProjectReferences);
            }
        }
예제 #3
0
        private void AddProjectToFolder(Proj proj)
        {
            if (string.IsNullOrEmpty(ProjectsRootDirectory) || !proj.Path.StartsWith(ProjectsRootDirectory, StringComparison.InvariantCultureIgnoreCase))
            {
                return;
            }

            var relativeFolderPath = GetSolutionFolderPath(proj);

            if (string.IsNullOrEmpty(relativeFolderPath))
            {
                return;
            }

            var folder = GetOrCreateSolutionFolder(relativeFolderPath);

            folder.AddContent(proj.Guid);
        }
예제 #4
0
        private void AddPartialProjectGraphToSln(SlnGenerationOptions options)
        {
            Log.Info("Building partial graph solution for target projects: " + string.Join(", ", options.TargetProjectNames));

            foreach (string targetProjectName in options.TargetProjectNames)
            {
                Proj rootProject = AddAssemblySubtree(targetProjectName);

                if (rootProject == null)
                {
                    Log.WarnFormat("Project {0} not found.", targetProjectName);
                }

                if (options.IncludeReferencing)
                {
                    AddReferencingProjects(rootProject);
                }
            }
        }
예제 #5
0
        private void AddProjectSubtree(string projectGuid)
        {
            Proj referencedProject = FindProjectByProjectGuid(projectGuid);

            AddProjectAndReferences(referencedProject);
        }
예제 #6
0
 private void AddProject(Proj project)
 {
     builtSln.AddProjects(project);
 }
예제 #7
0
        private string GetSolutionFolderPath(Proj proj)
        {
            var relativeProjectPath = proj.Path.Substring(ProjectsRootDirectory.Length + 1);

            return(Path.GetDirectoryName(Path.GetDirectoryName(relativeProjectPath)));
        }