81 instantiations of ProjectGraph
Microsoft.Build (1)
BackEnd\BuildManager\BuildManager.cs (1)
1892projectGraph = new ProjectGraph(
Microsoft.Build.Engine.UnitTests (79)
BackEnd\BuildManager_Tests.cs (3)
3590return new ProjectGraph(projectFilePath, projectCollection); 4203var graph = new ProjectGraph(project1); 4288var graph = new ProjectGraph(project1);
Construction\SolutionFilter_Tests.cs (1)
132ProjectGraph graphFromSolution = new(entryPoint, projectCollection);
Graph\GetCompatiblePlatformGraph_Tests.cs (11)
59ProjectGraph graph = new ProjectGraph(entryProject.Path); 99ProjectGraph graph = new ProjectGraph(entryProject.Path); 141ProjectGraph graph = new ProjectGraph(entryProject.Path); 181ProjectGraph graph = new ProjectGraph(entryProject.Path); 210ProjectGraph graph = new ProjectGraph(entryProject.Path); 238ProjectGraph graph = new ProjectGraph(entryProject.Path); 265ProjectGraph graph = new ProjectGraph(entryProject.Path); 293ProjectGraph graph = new ProjectGraph(entryProject.Path); 320ProjectGraph graph = new ProjectGraph(entryProject.Path); 350ProjectGraph graph = new ProjectGraph(entryProject.Path); 445ProjectGraph graphFromSolution = new(entryPoint, projectCollection);
Graph\GraphLoadedFromSolution_tests.cs (8)
47new ProjectGraph(files); 59new ProjectGraph("nonExistent.sln"); 83var aggException = Should.Throw<AggregateException>(() => new ProjectGraph(root.Path)); 254var graph = new ProjectGraph(solutionFile); 509graphFromSolution = new ProjectGraph(solutionFile); 596var graph = new ProjectGraph(_env.CreateFile("solution.sln", solutionContents).Path); 620var graph = new ProjectGraph(_env.CreateFile("solution.sln", solutionContents).Path); 683var graphFromSolution = new ProjectGraph(
Graph\IsolateProjects_Tests.cs (1)
322var projectGraph = new ProjectGraph(
Graph\ProjectGraph_Tests.cs (54)
50var projectGraph = new ProjectGraph(Enumerable.Empty<ProjectGraphEntryPoint>()); 65var projectGraph = new ProjectGraph(entryProject.Path); 93Should.Throw<CircularDependencyException>(() => new ProjectGraph(entryProject.Path)); 105var projectGraph = new ProjectGraph( 207var aggException = Should.Throw<AggregateException>(() => new ProjectGraph( 230ProjectGraph graph = new ProjectGraph(entryProject.Path); 259ProjectGraph graph = new ProjectGraph(entryProject.Path); 310Should.Throw<CircularDependencyException>(() => new ProjectGraph(entryProject.Path)).Message.ShouldContain(expectedErrorMessage); 322Should.Throw<CircularDependencyException>(() => new ProjectGraph(entryProject.Path)); 344Should.Throw<CircularDependencyException>(() => new ProjectGraph(entryProject.Path)).Message.ShouldContain(errorMessage); 364var graph = new ProjectGraph( 403ProjectGraph graph = new ProjectGraph(entryProject.Path); 430ProjectGraph graph = new ProjectGraph(entryProject.Path); 461ProjectGraph graph = new ProjectGraph(entryProject.Path); 495ProjectGraph graph = new ProjectGraph( 532ProjectGraph graph = new ProjectGraph(entryProject.Path); 563var aggException = Should.Throw<AggregateException>(() => new ProjectGraph(entryProject.Path)); 578var projectGraph = new ProjectGraph(new[] { entryProject1.Path, entryProject2.Path }); 601var projectGraph = new ProjectGraph(new[] { entryPoint1, entryPoint2 }); 640var projectGraph = new ProjectGraph(new[] { entryPoint1, entryPoint2 }); 673var projectGraph = new ProjectGraph(new[] { entryProject1.Path, entryProject2.Path, entryProject3.Path }); 861var projectGraph = new ProjectGraph(slnFile.Path); 924var projectGraph = new ProjectGraph(entryProject.Path); 952var projectGraph = new ProjectGraph(entryProject.Path); 983var projectGraph = new ProjectGraph(entryProject.Path); 1005var projectGraph = new ProjectGraph(entryProject.Path); 1023var projectGraph = new ProjectGraph(entryProject.Path); 1046var projectGraph = new ProjectGraph(entryProject.Path); 1069var projectGraph = new ProjectGraph(entryProject.Path); 1086var projectGraph = new ProjectGraph(entryProject.Path); 1109var projectGraph = new ProjectGraph(root1); 1150var projectGraph = new ProjectGraph(root1); 1184var projectGraph = new ProjectGraph(root1); 1251var graph = new ProjectGraph(entryProject); 1356var projectGraph = new ProjectGraph(new[] { root1, root2 }); 1394var projectGraph = new ProjectGraph(entryProject.Path); 1417var projectGraph = new ProjectGraph(entryProject.Path); 1447var projectGraph = new ProjectGraph(entryProject.Path); 1504var projectGraph = new ProjectGraph(entryProjectFile: entryProject.Path); 1632var graph = new ProjectGraph(new HashSet<string> { entryProject1.Path, entryProject2.Path }); 1884var graph = new ProjectGraph(projectFile); 1911var graph = new ProjectGraph(entryProject); 1945var graph = new ProjectGraph(entryProject); 1978var graph = new ProjectGraph(root); 1997var graph = new ProjectGraph(root); 2025var graph = new ProjectGraph(root); 2044var graph = new ProjectGraph(root, new Dictionary<string, string> { { InnerBuildPropertyName, "foo" } }); 2065var graph = new ProjectGraph(root); 2092var graph = new ProjectGraph(root); 2127var graph = new ProjectGraph(new[] 2166var graph = new ProjectGraph(root, additionalGlobalProperties); 2210var graph = new ProjectGraph(new[] { root }, additionalGlobalProperties); 2873ProjectGraph projectGraph = new(slnFile.Path); 2918ProjectGraph projectGraph = new(slnFile.Path);
ProjectCache\ProjectCacheTests.cs (1)
1347GraphBuildResult graphResult = buildSession.BuildGraph(new ProjectGraph(project.Path));
Microsoft.Build.UnitTests.Shared (1)
ObjectModelHelpers.cs (1)
1800return new ProjectGraph(
134 references to ProjectGraph
Microsoft.Build (16)
BackEnd\BuildManager\BuildManager.cs (3)
1889var projectGraph = submission.BuildRequestData.ProjectGraph; 1970static void DumpGraph(ProjectGraph graph, IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>>? targetList = null) 1984ProjectGraph projectGraph,
BackEnd\Components\ProjectCache\CacheContext.cs (3)
22public ProjectGraph? Graph { get; } 31ProjectGraph? graph = null, 41ProjectGraph? graph = null,
BackEnd\Components\ProjectCache\ProjectCacheService.cs (3)
99ProjectGraph projectGraph, 160ProjectGraph? projectGraph, 195ProjectGraph? projectGraph,
Graph\GraphBuilder.cs (2)
51private readonly ProjectGraph.ProjectInstanceFactoryFunc _projectInstanceFactory; 58ProjectGraph.ProjectInstanceFactoryFunc projectInstanceFactory,
Graph\GraphBuildRequestData.cs (4)
32public GraphBuildRequestData(ProjectGraph projectGraph, ICollection<string> targetsToBuild) 43public GraphBuildRequestData(ProjectGraph projectGraph, ICollection<string> targetsToBuild, HostServices? hostServices) 55public GraphBuildRequestData(ProjectGraph projectGraph, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags) 180public ProjectGraph? ProjectGraph { get; }
Graph\ProjectInterpretation.cs (1)
77public IEnumerable<ReferenceInfo> GetReferences(ProjectGraphNode projectGraphNode, ProjectCollection projectCollection, ProjectGraph.ProjectInstanceFactoryFunc projectInstanceFactory)
Microsoft.Build.Engine.UnitTests (116)
BackEnd\BuildManager_Tests.cs (5)
177var graph = Helpers.CreateProjectGraph( 3585private ProjectGraph CreateProjectGraph(string contents, ProjectCollection projectCollection) 4203var graph = new ProjectGraph(project1); 4288var graph = new ProjectGraph(project1); 4345var graph = Helpers.CreateProjectGraph(env: _env, dependencyEdges: new Dictionary<int, int[]> { { 1, new[] { 2, 3 } } });
Construction\SolutionFilter_Tests.cs (1)
132ProjectGraph graphFromSolution = new(entryPoint, projectCollection);
Graph\GetCompatiblePlatformGraph_Tests.cs (11)
59ProjectGraph graph = new ProjectGraph(entryProject.Path); 99ProjectGraph graph = new ProjectGraph(entryProject.Path); 141ProjectGraph graph = new ProjectGraph(entryProject.Path); 181ProjectGraph graph = new ProjectGraph(entryProject.Path); 210ProjectGraph graph = new ProjectGraph(entryProject.Path); 238ProjectGraph graph = new ProjectGraph(entryProject.Path); 265ProjectGraph graph = new ProjectGraph(entryProject.Path); 293ProjectGraph graph = new ProjectGraph(entryProject.Path); 320ProjectGraph graph = new ProjectGraph(entryProject.Path); 350ProjectGraph graph = new ProjectGraph(entryProject.Path); 445ProjectGraph graphFromSolution = new(entryPoint, projectCollection);
Graph\GraphLoadedFromSolution_tests.cs (8)
210var graph = CreateProjectGraph(_env, edges); 254var graph = new ProjectGraph(solutionFile); 484var graph = CreateProjectGraph( 505ProjectGraph graphFromSolution = null; 596var graph = new ProjectGraph(_env.CreateFile("solution.sln", solutionContents).Path); 620var graph = new ProjectGraph(_env.CreateFile("solution.sln", solutionContents).Path); 666var graph = CreateProjectGraph(_env, edges); 683var graphFromSolution = new ProjectGraph(
Graph\GraphTestingUtilities.cs (6)
42ProjectGraph graph, 131internal static ProjectGraphNode GetFirstNodeWithProjectNumber(ProjectGraph graph, int projectNum) 136internal static IEnumerable<ProjectGraphNode> GetNodesWithProjectNumber(ProjectGraph graph, int projectNum) 141internal static ProjectGraphNode GetOuterBuild(ProjectGraph graph, int projectNumber) 146internal static IReadOnlyCollection<ProjectGraphNode> GetInnerBuilds(ProjectGraph graph, int projectNumber) 232internal static void AssertReferencesIgnoringOrder(this ProjectGraph graph, Dictionary<int, int[]> expectedReferencesForNode)
Graph\IsolateProjects_Tests.cs (1)
322var projectGraph = new ProjectGraph(
Graph\ProjectGraph_Tests.cs (64)
50var projectGraph = new ProjectGraph(Enumerable.Empty<ProjectGraphEntryPoint>()); 65var projectGraph = new ProjectGraph(entryProject.Path); 74var graph = Helpers.CreateProjectGraph( 105var projectGraph = new ProjectGraph( 111return ProjectGraph.StaticProjectInstanceFactory( 230ProjectGraph graph = new ProjectGraph(entryProject.Path); 259ProjectGraph graph = new ProjectGraph(entryProject.Path); 364var graph = new ProjectGraph( 403ProjectGraph graph = new ProjectGraph(entryProject.Path); 430ProjectGraph graph = new ProjectGraph(entryProject.Path); 461ProjectGraph graph = new ProjectGraph(entryProject.Path); 495ProjectGraph graph = new ProjectGraph( 532ProjectGraph graph = new ProjectGraph(entryProject.Path); 578var projectGraph = new ProjectGraph(new[] { entryProject1.Path, entryProject2.Path }); 601var projectGraph = new ProjectGraph(new[] { entryPoint1, entryPoint2 }); 640var projectGraph = new ProjectGraph(new[] { entryPoint1, entryPoint2 }); 673var projectGraph = new ProjectGraph(new[] { entryProject1.Path, entryProject2.Path, entryProject3.Path }); 861var projectGraph = new ProjectGraph(slnFile.Path); 924var projectGraph = new ProjectGraph(entryProject.Path); 952var projectGraph = new ProjectGraph(entryProject.Path); 983var projectGraph = new ProjectGraph(entryProject.Path); 1005var projectGraph = new ProjectGraph(entryProject.Path); 1023var projectGraph = new ProjectGraph(entryProject.Path); 1046var projectGraph = new ProjectGraph(entryProject.Path); 1069var projectGraph = new ProjectGraph(entryProject.Path); 1086var projectGraph = new ProjectGraph(entryProject.Path); 1109var projectGraph = new ProjectGraph(root1); 1150var projectGraph = new ProjectGraph(root1); 1184var projectGraph = new ProjectGraph(root1); 1251var graph = new ProjectGraph(entryProject); 1356var projectGraph = new ProjectGraph(new[] { root1, root2 }); 1375void AssertMultitargetingNode(int projectNumber, ProjectGraph projectGraph, IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists, string[] outerBuildTargets, string[] nonOuterBuildTargets) 1394var projectGraph = new ProjectGraph(entryProject.Path); 1417var projectGraph = new ProjectGraph(entryProject.Path); 1447var projectGraph = new ProjectGraph(entryProject.Path); 1504var projectGraph = new ProjectGraph(entryProjectFile: entryProject.Path); 1520ProjectGraph graph = Helpers.CreateProjectGraph( 1572ProjectGraph graph = Helpers.CreateProjectGraph( 1632var graph = new ProjectGraph(new HashSet<string> { entryProject1.Path, entryProject2.Path }); 1811var projectGraph = Helpers.CreateProjectGraph(env, edges); 1832var graph = Helpers.CreateProjectGraph( 1884var graph = new ProjectGraph(projectFile); 1911var graph = new ProjectGraph(entryProject); 1945var graph = new ProjectGraph(entryProject); 1978var graph = new ProjectGraph(root); 1997var graph = new ProjectGraph(root); 2025var graph = new ProjectGraph(root); 2044var graph = new ProjectGraph(root, new Dictionary<string, string> { { InnerBuildPropertyName, "foo" } }); 2065var graph = new ProjectGraph(root); 2092var graph = new ProjectGraph(root); 2127var graph = new ProjectGraph(new[] 2166var graph = new ProjectGraph(root, additionalGlobalProperties); 2210var graph = new ProjectGraph(new[] { root }, additionalGlobalProperties); 2327var projectGraph = Helpers.CreateProjectGraph(env, edges, globalProperties, entryPoints: entryPoints); 2346var projectGraph = Helpers.CreateProjectGraph( 2359var graph = Helpers.CreateProjectGraph( 2487var graph = Helpers.CreateProjectGraph( 2498var graph = Helpers.CreateProjectGraph( 2561var graph = Helpers.CreateProjectGraph( 2667var graph = Helpers.CreateProjectGraph( 2709var graph = Helpers.CreateProjectGraph( 2752ProjectGraph graph = Helpers.CreateProjectGraph( 2873ProjectGraph projectGraph = new(slnFile.Path); 2918ProjectGraph projectGraph = new(slnFile.Path);
ProjectCache\ProjectCacheTests.cs (19)
107public ProjectGraph CreateGraph(TestEnvironment env) 457var graph = testData.CreateGraph(_env); 483var graph = testData.CreateGraph(_env); 518(MockLogger logger, ProjectGraph graph, Dictionary<ProjectGraphNode, BuildResult> nodesToBuildResults) = BuildGraphVsScenario(testData, buildParameters); 536(MockLogger logger, ProjectGraph graph, _) = BuildGraphVsScenario(testData, assertBuildResults: false); 542private (MockLogger logger, ProjectGraph projectGraph, Dictionary<ProjectGraphNode, BuildResult> nodesToBuildResults) BuildGraphVsScenario( 549ProjectGraph graph; 682var graph = testData.CreateGraph(_env); 740var graph = testData.CreateGraph(_env); 772ProjectGraph graph, 915var graph = testData.CreateGraph(_env); 946var graph = testData.CreateGraph(_env); 991var graph = testData.CreateGraph(_env); 1021var graph = Helpers.CreateProjectGraph( 1053var graph = Helpers.CreateProjectGraph( 1229var graph = Helpers.CreateProjectGraph( 1368var graph = testData.CreateGraph(_env); 1461var graph = testData.CreateGraph(_env); 1524var graph = testData.CreateGraph(_env);
SolutionFileBuilder.cs (1)
87ProjectGraph graph,
Microsoft.Build.UnitTests.Shared (2)
ObjectModelHelpers.cs (2)
1740public static ProjectGraph CreateProjectGraph( 2130public GraphBuildResult BuildGraph(ProjectGraph graph, string[] entryTargets = null)