3 writes to _weakCache
Microsoft.Build (3)
Evaluation\ProjectRootElementCache.cs (3)
154
_weakCache
= new WeakValueDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
446
_weakCache
= new WeakValueDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
485
_weakCache
= new WeakValueDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
11 references to _weakCache
Microsoft.Build (11)
Evaluation\ProjectRootElementCache.cs (11)
296
_weakCache
.TryGetValue(projectFile, out projectRootElement);
466
DebugTraceCache("Keeping cache after build (auto reload from disk): ",
_weakCache
.Count);
484
WeakValueDictionary<string, ProjectRootElement> oldWeakCache =
_weakCache
;
499
_weakCache
[kvp.Key] = kvp.Value;
533
_weakCache
.Remove(projectRootElement.FullPath);
552
Assumed.Equal(
_weakCache
[oldFullPathIfAny], projectRootElement, "Should already be present");
553
_weakCache
.Remove(oldFullPathIfAny);
567
_weakCache
.TryGetValue(projectRootElement.FullPath, out existingWeakEntry);
575
_weakCache
[projectRootElement.FullPath] = projectRootElement;
630
_weakCache
.Remove(projectRootElement.FullPath);
648
if (
_weakCache
.TryGetValue(projectRootElement.FullPath, out var cached) && cached == projectRootElement)