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); 1775return new ProjectRootElement(document, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
Definition\Project.cs (3)
1957ProjectCollection.ProjectRootElementCache, 3730ProjectCollection.ProjectRootElementCache, 4326TaskRegistry = 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; 1182ProjectRootElement xml = ProjectRootElement.OpenProjectOrSolution(fileName, globalProperties, toolsVersion, ProjectRootElementCache, true /*explicitlyloaded*/); 1350ProjectRootElementCache.DiscardStrongReferences(); 1394ProjectRootElementCache.DiscardAnyWeakReference(projectRootElement); 1417ProjectRootElementCache.Clear(); 1538ProjectRootElementCache.DiscardStrongReferences(); 1543ProjectRootElementCache.DiscardAnyWeakReference(projectRootElement); 1636if (ProjectRootElementCache != null) 1638ProjectRootElementCache.ProjectRootElementAddedHandler -= ProjectRootElementCache_ProjectRootElementAddedHandler; 1639ProjectRootElementCache.ProjectRootElementDirtied -= ProjectRootElementCache_ProjectRootElementDirtiedHandler; 1640ProjectRootElementCache.ProjectDirtied -= ProjectRootElementCache_ProjectDirtiedHandler;
Instance\ProjectInstance.cs (5)
399this.TaskRegistry = new TaskRegistry(Toolset, project.ProjectCollection.ProjectRootElementCache); 401this.ProjectRootElementCache = project.ProjectCollection.ProjectRootElementCache; 475TaskRegistry = new TaskRegistry(Toolset, linkedProject.ProjectCollection.ProjectRootElementCache); 477ProjectRootElementCache = linkedProject.ProjectCollection.ProjectRootElementCache; 671this.ProjectRootElementCache = data.Project.ProjectCollection.ProjectRootElementCache;
Microsoft.Build.Engine.UnitTests (24)
BackEnd\BuildManager_Tests.cs (3)
1984_parameters.ProjectRootElementCache = _projectCollection.ProjectRootElementCache; 2040_parameters.ProjectRootElementCache = projectCollection.ProjectRootElementCache; 2060_parameters.ProjectRootElementCache = projectCollection.ProjectRootElementCache;
BackEnd\TaskRegistry_Tests.cs (2)
2182? new TaskRegistry(toolset, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache) 2183: new TaskRegistry(ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
Definition\ToolsVersion_Tests.cs (10)
38TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), e.ProjectRootElementCache); 39TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), e.ProjectRootElementCache); 83TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), e.ProjectRootElementCache); 100TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), e.ProjectRootElementCache); 117TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), e.ProjectRootElementCache); 135TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), e.ProjectRootElementCache); 156TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(null, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), ProjectCollection.GlobalProjectCollection.ProjectRootElementCache); 184TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(service, BuildEventContext.Invalid, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache); 206TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(service, BuildEventContext.Invalid, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache); 897TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(null, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), 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));
Instance\ProjectInstance_Internal_Tests.cs (1)
287XmlReader.Create(new StringReader("<Project></Project>")), ProjectCollection.GlobalProjectCollection.ProjectRootElementCache, false, false));