3 writes to ProjectRootElementCache
Microsoft.Build (3)
Definition\ProjectCollection.cs (3)
311ProjectRootElementCache = new SimpleProjectRootElementCache(); 315ProjectRootElementCache = s_projectRootElementCache; 323ProjectRootElementCache = new ProjectRootElementCache(autoReloadFromDisk, loadProjectsReadOnly);
54 references to ProjectRootElementCache
Microsoft.Build (30)
BackEnd\BuildManager\BuildParameters.cs (1)
245Initialize(new PropertyDictionary<ProjectPropertyInstance>(projectCollection.EnvironmentProperties), projectCollection.ProjectRootElementCache, new ToolsetProvider(projectCollection.Toolsets));
Construction\ProjectRootElement.cs (7)
739return Create(projectCollection.ProjectRootElementCache); 749return Create(projectCollection.ProjectRootElementCache, projectFileOptions); 789projectCollection.ProjectRootElementCache, 825return new ProjectRootElement(xmlReader, projectCollection.ProjectRootElementCache, true /*Explicitly loaded*/, 861return Open(path, projectCollection.ProjectRootElementCache, true /*Is explicitly loaded*/, preserveFormatting); 918ProjectRootElement projectRootElement = projectCollection.ProjectRootElementCache.TryGet(path, preserveFormatting); 1757return new ProjectRootElement(document, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
Definition\Project.cs (3)
1957ProjectCollection.ProjectRootElementCache, 3728ProjectCollection.ProjectRootElementCache, 4324TaskRegistry = new TaskRegistry(Toolset, Project.ProjectCollection.ProjectRootElementCache);
Definition\ProjectCollection.cs (14)
326s_projectRootElementCache = ProjectRootElementCache; 379ProjectRootElementCache.ProjectRootElementAddedHandler += ProjectRootElementCache_ProjectRootElementAddedHandler; 380ProjectRootElementCache.ProjectRootElementDirtied += ProjectRootElementCache_ProjectRootElementDirtiedHandler; 381ProjectRootElementCache.ProjectDirtied += ProjectRootElementCache_ProjectDirtiedHandler; 1197ProjectRootElement xml = ProjectRootElement.OpenProjectOrSolution(fileName, globalProperties, toolsVersion, ProjectRootElementCache, true /*explicitlyloaded*/); 1365ProjectRootElementCache.DiscardStrongReferences(); 1396ProjectRootElementCache.DiscardAnyWeakReference(projectRootElement); 1419ProjectRootElementCache.Clear(); 1540ProjectRootElementCache.DiscardStrongReferences(); 1545ProjectRootElementCache.DiscardAnyWeakReference(projectRootElement); 1637if (ProjectRootElementCache != null) 1639ProjectRootElementCache.ProjectRootElementAddedHandler -= ProjectRootElementCache_ProjectRootElementAddedHandler; 1640ProjectRootElementCache.ProjectRootElementDirtied -= ProjectRootElementCache_ProjectRootElementDirtiedHandler; 1641ProjectRootElementCache.ProjectDirtied -= ProjectRootElementCache_ProjectDirtiedHandler;
Instance\ProjectInstance.cs (5)
401this.TaskRegistry = new TaskRegistry(Toolset, project.ProjectCollection.ProjectRootElementCache); 403this.ProjectRootElementCache = project.ProjectCollection.ProjectRootElementCache; 477TaskRegistry = new TaskRegistry(Toolset, linkedProject.ProjectCollection.ProjectRootElementCache); 479ProjectRootElementCache = linkedProject.ProjectCollection.ProjectRootElementCache; 673this.ProjectRootElementCache = data.Project.ProjectCollection.ProjectRootElementCache;
Microsoft.Build.Engine.UnitTests (23)
BackEnd\BuildManager_Tests.cs (3)
2049_parameters.ProjectRootElementCache = _projectCollection.ProjectRootElementCache; 2105_parameters.ProjectRootElementCache = projectCollection.ProjectRootElementCache; 2125_parameters.ProjectRootElementCache = projectCollection.ProjectRootElementCache;
BackEnd\TaskRegistry_Tests.cs (2)
2183? new TaskRegistry(toolset, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache) 2184: new TaskRegistry(ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
Definition\ToolsVersion_Tests.cs (10)
41TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(loggingContext, e.ProjectRootElementCache); 42TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(loggingContext, e.ProjectRootElementCache); 89TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(loggingContext, e.ProjectRootElementCache); 108TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(loggingContext, e.ProjectRootElementCache); 127TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(loggingContext, e.ProjectRootElementCache); 147TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(loggingContext, e.ProjectRootElementCache); 170TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(loggingContext, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache); 200TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(loggingContext, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache); 223TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(loggingContext, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache); 938TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(loggingContext, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
Evaluation\ProjectCollection_Tests.cs (2)
18collectionWithDefaultCache.ProjectRootElementCache.ShouldBeOfType<ProjectRootElementCache>(); 26collectionWithSimpleCache.ProjectRootElementCache.ShouldBeOfType<SimpleProjectRootElementCache>();
Evaluation\ProjectRootElementCache_Tests.cs (6)
52ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.Get("c:\\foo", (p, c) => null, true, false); 63ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.Get("c:\\foo", (p, c) => ProjectRootElement.Create("c:\\bar"), true, false); 74ProjectRootElement projectRootElement2 = ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.Get(rootedPath, (p, c) => { throw new InvalidOperationException(); }, true, false); 91projectRootElement = ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.Get(projectPath, (p, c) => { throw new InvalidOperationException(); }, true, false); 95ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.DiscardStrongReferences(); 99Assert.Null(ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.TryGet(projectPath));
Microsoft.Build.UnitTests.Shared (1)
ProjectFromString.cs (1)
75Project = new ProjectRootElement(_reader, projectCollection.ProjectRootElementCache, isExplicitlyLoaded, preserveFormatting);