コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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);
            }
        }