private async Task AddProjectReferencesToGraphAsync(VsProject parent, BidirectionalGraph <object, IEdge <object> > graph, List <NuGetPackageReference> packagesInGraph, List <VsProject> projectsInGraph) { foreach (var projectReference in parent.ProjectReferences) { var existingProject = TryGetExistingProject(projectReference, projectsInGraph); if (existingProject == null) { var referencedProject = AllProjects.SingleOrDefault(p => p.IsSameProject(projectReference)); if (referencedProject != null) { AddProjectVertex(referencedProject, graph, projectsInGraph); AddEdge(parent, referencedProject, Colors.Green, graph); await AddNuGetPackagesToGraphAsync(referencedProject, referencedProject.NuGetReferences, Colors.DarkBlue, graph, packagesInGraph); await AddProjectReferencesToGraphAsync(referencedProject, graph, packagesInGraph, projectsInGraph); } } else { AddEdge(parent, existingProject, Colors.Green, graph); } } }
public Project GetProject(string nameOrFullPath) { return(AllProjects.SingleOrDefault(x => nameOrFullPath.Equals(x.Name, StringComparison.Ordinal)) ?? AllProjects.SingleOrDefault(x => x.Path.ToString().EqualsOrdinalIgnoreCase(nameOrFullPath))); }
public Project GetProject(string name) { return(AllProjects.SingleOrDefault(x => name.Equals(x.Name, StringComparison.Ordinal))); }
public IDotNetProjectInstance FindProjectById(string projectId) { return(AllProjects.SingleOrDefault(p => p.Id == projectId)); }
public IDotNetProjectInstance GetProjectInstanceForProjectFile(string absolutePath) { return(AllProjects.SingleOrDefault(p => p.ProjectFileAbsolutePath == absolutePath)); }
public IDotNetProjectInstance GetProjectInstanceForProjectFile(string absolutePath) { var target = absolutePath.ToLower(); return(AllProjects.SingleOrDefault(p => p.ProjectFileAbsolutePath.ToLower() == target)); }