Example #1
0
        private void ProcessLinks(ProjectDetailRepository projectRepository, ISet <InvestigationLink> linksToBeInvestigated, bool includeExternalReferences)
        {
            while (linksToBeInvestigated.Any())
            {
                var investigation = linksToBeInvestigated.First();
                _ = linksToBeInvestigated.Remove(investigation);

                if (!investigation.IsProjectLoadable)
                {
                    continue;
                }

                if (!projectRepository.Has(investigation.Guid))
                {
                    var projectDetail = _projectFactory.MakeProjectDetail(projectRepository, investigation.FullPath, investigation.Guid, includeExternalReferences);
                    if (investigation.Parent != null)
                    {
                        _ = projectDetail.ParentProjects.Add(new ProjectLinkObject(projectRepository.GetById(investigation.Parent.Id)));
                    }

                    var parent = new ProjectLinkObject(projectDetail);

                    var children = projectDetail.ChildProjects.Select(child => new InvestigationLink(parent, child));

                    linksToBeInvestigated.UnionWith(children);

                    projectRepository.Add(projectDetail);
                }
            }
        }
        private static void ProcessLinks(List <InvestigationLink> linksToBeInvestigated, RootNode rootNode, bool includeExternalReferences)
        {
            while (linksToBeInvestigated.Any())
            {
                var item = linksToBeInvestigated[0];
                linksToBeInvestigated.RemoveAt(0);

                var link = new ProjectLinkObject {
                    FullPath = item.FullPath
                };
                var projectDetail = new ProjectFileManager().Create(link, includeExternalReferences);
                if (item.Parent != null)
                {
                    projectDetail.ParentProjects.Add(item.Parent);
                }

                link.Id = projectDetail.Id;

                //get all child links and create link investigations for them
                linksToBeInvestigated.AddRange(projectDetail.ChildProjects.Select(p => new InvestigationLink {
                    FullPath = p.FullPath, Parent = link
                }).ToList());

                rootNode.ProjectDetails.Add(projectDetail);
            }
        }
 private YumlClassWithDetails MakeClass(ProjectDetail childProjectDetail, ProjectLinkObject linkObject)
 {
     if (null != childProjectDetail)
     {
         return(MakeClass(childProjectDetail));
     }
     else
     {
         return(MakeClass(linkObject));
     }
 }
 private static YumlClassWithDetails MakeClass(ProjectLinkObject projectLink)
 {
     return(new YumlClassWithDetails(projectLink.FullPath));
 }
Example #5
0
 private void ProcessCsProjRootNode(ProjectDetailRepository projectRepository, string fullPath, bool includeExternalReferences)
 {
     ProcessLinks(projectRepository, new HashSet <InvestigationLink> {
         new InvestigationLink(null, ProjectLinkObject.MakeOutOfSolutionLink(fullPath))
     }, includeExternalReferences);
 }
 /// <summary>
 /// Creates a project detail object from the link information provided.
 /// </summary>
 /// <param name="linkObject"></param>
 /// <returns></returns>
 public ProjectDetail Create(ProjectLinkObject linkObject)
 {
     return Create(linkObject.FullPath);
 }
Example #7
0
 /// <summary>
 /// Creates a project detail object from the link information provided.
 /// </summary>
 /// <param name="linkObject"></param>
 /// <returns></returns>
 public ProjectDetail Create(ProjectLinkObject linkObject, bool includeExternalReferences)
 {
     return(Create(linkObject.FullPath, includeExternalReferences));
 }
        private static void ProcessLinks(List<InvestigationLink> linksToBeInvestigated, RootNode rootNode)
        {
            while (linksToBeInvestigated.Any())
            {
                var item = linksToBeInvestigated[0];
                linksToBeInvestigated.RemoveAt(0);

                var link = new ProjectLinkObject {FullPath = item.FullPath};
                var projectDetail = new ProjectFileManager().Create(link);
                if (item.Parent != null)
                {
                    projectDetail.ParentProjects.Add(item.Parent);
                }

                link.Id = projectDetail.Id;

                //get all child links and create link investigations for them
                linksToBeInvestigated.AddRange(projectDetail.ChildProjects.Select(p => new InvestigationLink { FullPath = p.FullPath, Parent = link }).ToList());

                rootNode.ProjectDetails.Add(projectDetail);
            }
        }