52 references to GetProjectsByName
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
1556var projectC = solution.GetProjectsByName("C").Single();
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (21)
MSBuildWorkspaceTestBase.cs (2)
79var project = sol.GetProjectsByName("VisualBasicProject").FirstOrDefault(); 88var project = sol.GetProjectsByName("VisualBasicProject").FirstOrDefault();
VisualStudioMSBuildWorkspaceTests.cs (19)
372var project2 = solution.GetProjectsByName("Project2").First(); 1836var project = solution.GetProjectsByName("VisualBasicProject").FirstOrDefault(); 1862var project = solution.GetProjectsByName("VisualBasicProject").FirstOrDefault(); 1896var project = sol.GetProjectsByName("VisualBasicProject").FirstOrDefault(); 1919var project = sol.GetProjectsByName("VisualBasicProject").FirstOrDefault(); 1943var project = sol.GetProjectsByName("CSharpProject").FirstOrDefault(); 1966var project = sol.GetProjectsByName("CSharpProject").FirstOrDefault(); 1991var project = solution.GetProjectsByName("CSharpProject").FirstOrDefault(); 2012var project = solution.GetProjectsByName("CSharpProject").FirstOrDefault(); 2019var project2 = solution2.GetProjectsByName("CSharpProject").FirstOrDefault(); 2038var projectB = workspaceB.CurrentSolution.GetProjectsByName("CSharpProject").FirstOrDefault(); 2053var project = solution.GetProjectsByName("CSharpProject").FirstOrDefault(); 2062var project2 = solution2.GetProjectsByName("CSharpProject").FirstOrDefault(); 2087var project = solution.GetProjectsByName("CSharpProject").FirstOrDefault(); 2095var project2 = solution2.GetProjectsByName("CSharpProject").FirstOrDefault(); 2114var documents = solution.GetProjectsByName("CSharpProject").FirstOrDefault().Documents.ToList(); 2141var documents = solution.GetProjectsByName("CSharpProject").FirstOrDefault().AdditionalDocuments.ToList(); 2168var project = solution.GetProjectsByName("CSharpProject").FirstOrDefault(); 2473Assert.NotNull(project.Solution.GetProjectsByName("CSharpProject").SingleOrDefault());
Microsoft.CodeAnalysis.Workspaces.UnitTests (30)
SolutionTests\ProjectDependencyGraphTests.cs (28)
216solution = solution.WithProjectReferences(solution.GetProjectsByName("C").Single().Id, []); 226var projectAId = solution.GetProjectsByName("A").Single().Id; 227var projectBId = solution.GetProjectsByName("B").Single().Id; 280var projectId = solution.GetProjectsByName(project).Single().Id; 297var projectId = solution.GetProjectsByName(project).Single().Id; 315solution = solution.WithProjectReferences(solution.GetProjectsByName("A").Single().Id, 395solution = solution.WithProjectReferences(solution.GetProjectsByName("C").Single().Id, []); 415solution = solution.RemoveProject(solution.GetProjectsByName("B").Single().Id); 437solution = solution.RemoveProject(solution.GetProjectsByName("B").Single().Id); 459solution = solution.RemoveProject(solution.GetProjectsByName("B").Single().Id); 481solution = solution.RemoveProject(solution.GetProjectsByName("B").Single().Id); 503var a = solution.GetProjectsByName("A").Single(); 504var b = solution.GetProjectsByName("B").Single(); 505var d = solution.GetProjectsByName("D").Single(); 531var a = solution.GetProjectsByName("A").Single(); 532var b = solution.GetProjectsByName("B").Single(); 533var e = solution.GetProjectsByName("E").Single(); 560var a = solution.GetProjectsByName("A").Single(); 561var b = solution.GetProjectsByName("B").Single(); 562var c = solution.GetProjectsByName("C").Single(); 613var b = solution.GetProjectsByName("B").Single(); 614var c = solution.GetProjectsByName("C").Single(); 619b = solution.GetProjectsByName("B").Single(); 648var projectId = solution.GetProjectsByName(project).Single().Id; 660var projectId = solution.GetProjectsByName(project).Single().Id; 724references.Add(new ProjectReference(solution.GetProjectsByName(targetProject).Single().Id)); 728references.Add(new ProjectReference(solution.GetProjectsByName(targetProject).Single().Id, [$"alias{references.Count}"])); 733solution.GetProjectsByName(projectName).Single().Id,
SolutionTests\SolutionTests.cs (2)
2559Assert.Equal(2, solution.GetProjectsByName("name").Count()); 2842Assert.Equal(project, solution.GetProjectsByName(project.Name).FirstOrDefault());