3 writes to ProjectRootElementCache
Microsoft.Build (3)
Definition\ProjectCollection.cs (3)
311
ProjectRootElementCache
= new SimpleProjectRootElementCache();
315
ProjectRootElementCache
= s_projectRootElementCache;
323
ProjectRootElementCache
= new ProjectRootElementCache(autoReloadFromDisk, loadProjectsReadOnly);
54 references to ProjectRootElementCache
Microsoft.Build (30)
BackEnd\BuildManager\BuildParameters.cs (1)
245
Initialize(new PropertyDictionary<ProjectPropertyInstance>(projectCollection.EnvironmentProperties), projectCollection.
ProjectRootElementCache
, new ToolsetProvider(projectCollection.Toolsets));
Construction\ProjectRootElement.cs (7)
739
return Create(projectCollection.
ProjectRootElementCache
);
749
return Create(projectCollection.
ProjectRootElementCache
, projectFileOptions);
789
projectCollection.
ProjectRootElementCache
,
825
return new ProjectRootElement(xmlReader, projectCollection.
ProjectRootElementCache
, true /*Explicitly loaded*/,
861
return Open(path, projectCollection.
ProjectRootElementCache
, true /*Is explicitly loaded*/, preserveFormatting);
918
ProjectRootElement projectRootElement = projectCollection.
ProjectRootElementCache
.TryGet(path, preserveFormatting);
1775
return new ProjectRootElement(document, ProjectCollection.GlobalProjectCollection.
ProjectRootElementCache
);
Definition\Project.cs (3)
1957
ProjectCollection.
ProjectRootElementCache
,
3730
ProjectCollection.
ProjectRootElementCache
,
4326
TaskRegistry = new TaskRegistry(Toolset, Project.ProjectCollection.
ProjectRootElementCache
);
Definition\ProjectCollection.cs (14)
326
s_projectRootElementCache =
ProjectRootElementCache
;
379
ProjectRootElementCache
.ProjectRootElementAddedHandler += ProjectRootElementCache_ProjectRootElementAddedHandler;
380
ProjectRootElementCache
.ProjectRootElementDirtied += ProjectRootElementCache_ProjectRootElementDirtiedHandler;
381
ProjectRootElementCache
.ProjectDirtied += ProjectRootElementCache_ProjectDirtiedHandler;
1182
ProjectRootElement xml = ProjectRootElement.OpenProjectOrSolution(fileName, globalProperties, toolsVersion,
ProjectRootElementCache
, true /*explicitlyloaded*/);
1350
ProjectRootElementCache
.DiscardStrongReferences();
1394
ProjectRootElementCache
.DiscardAnyWeakReference(projectRootElement);
1417
ProjectRootElementCache
.Clear();
1538
ProjectRootElementCache
.DiscardStrongReferences();
1543
ProjectRootElementCache
.DiscardAnyWeakReference(projectRootElement);
1636
if (
ProjectRootElementCache
!= null)
1638
ProjectRootElementCache
.ProjectRootElementAddedHandler -= ProjectRootElementCache_ProjectRootElementAddedHandler;
1639
ProjectRootElementCache
.ProjectRootElementDirtied -= ProjectRootElementCache_ProjectRootElementDirtiedHandler;
1640
ProjectRootElementCache
.ProjectDirtied -= ProjectRootElementCache_ProjectDirtiedHandler;
Instance\ProjectInstance.cs (5)
399
this.TaskRegistry = new TaskRegistry(Toolset, project.ProjectCollection.
ProjectRootElementCache
);
401
this.ProjectRootElementCache = project.ProjectCollection.
ProjectRootElementCache
;
475
TaskRegistry = new TaskRegistry(Toolset, linkedProject.ProjectCollection.
ProjectRootElementCache
);
477
ProjectRootElementCache = linkedProject.ProjectCollection.
ProjectRootElementCache
;
671
this.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)
38
TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), e.
ProjectRootElementCache
);
39
TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), e.
ProjectRootElementCache
);
83
TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), e.
ProjectRootElementCache
);
100
TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), e.
ProjectRootElementCache
);
117
TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), e.
ProjectRootElementCache
);
135
TaskRegistry taskoverrideRegistry = (TaskRegistry)t.GetOverrideTaskRegistry(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), e.
ProjectRootElementCache
);
156
TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(null, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), ProjectCollection.GlobalProjectCollection.
ProjectRootElementCache
);
184
TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(service, BuildEventContext.Invalid, ProjectCollection.GlobalProjectCollection.
ProjectRootElementCache
);
206
TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(service, BuildEventContext.Invalid, ProjectCollection.GlobalProjectCollection.
ProjectRootElementCache
);
897
TaskRegistry taskRegistry = (TaskRegistry)t.GetTaskRegistry(null, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4), ProjectCollection.GlobalProjectCollection.
ProjectRootElementCache
);
Evaluation\ProjectCollection_Tests.cs (2)
18
collectionWithDefaultCache.
ProjectRootElementCache
.ShouldBeOfType<ProjectRootElementCache>();
26
collectionWithSimpleCache.
ProjectRootElementCache
.ShouldBeOfType<SimpleProjectRootElementCache>();
Evaluation\ProjectRootElementCache_Tests.cs (6)
52
ProjectCollection.GlobalProjectCollection.
ProjectRootElementCache
.Get("c:\\foo", (p, c) => null, true, false);
63
ProjectCollection.GlobalProjectCollection.
ProjectRootElementCache
.Get("c:\\foo", (p, c) => ProjectRootElement.Create("c:\\bar"), true, false);
74
ProjectRootElement projectRootElement2 = ProjectCollection.GlobalProjectCollection.
ProjectRootElementCache
.Get(rootedPath, (p, c) => { throw new InvalidOperationException(); }, true, false);
91
projectRootElement = ProjectCollection.GlobalProjectCollection.
ProjectRootElementCache
.Get(projectPath, (p, c) => { throw new InvalidOperationException(); }, true, false);
95
ProjectCollection.GlobalProjectCollection.
ProjectRootElementCache
.DiscardStrongReferences();
99
Assert.Null(ProjectCollection.GlobalProjectCollection.
ProjectRootElementCache
.TryGet(projectPath));
Instance\ProjectInstance_Internal_Tests.cs (1)
287
XmlReader.Create(new StringReader("<Project></Project>")), ProjectCollection.GlobalProjectCollection.
ProjectRootElementCache
, false, false));