3 writes to _weakCache
Microsoft.Build (3)
Evaluation\ProjectRootElementCache.cs (3)
158
_weakCache
= new WeakValueDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
465
_weakCache
= new WeakValueDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
520
_weakCache
= new WeakValueDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
14 references to _weakCache
Microsoft.Build (14)
Evaluation\ProjectRootElementCache.cs (14)
302
_weakCache
.TryGetValue(projectFile, out projectRootElement);
485
_weakCache
.Remove(projectRootElement.FullPath);
494
IList<string> toBeRemovedFromWeakRefs =
_weakCache
.Keys.Except(_strongCache.Select(i => i.FullPath)).ToList();
497
_weakCache
.Remove(victim);
499
_weakCache
.Scavenge();
519
WeakValueDictionary<string, ProjectRootElement> oldWeakCache =
_weakCache
;
534
_weakCache
[kvp.Key] = kvp.Value;
572
_weakCache
.Remove(projectRootElement.FullPath);
591
ErrorUtilities.VerifyThrow(
_weakCache
[oldFullPathIfAny] == projectRootElement, "Should already be present");
592
_weakCache
.Remove(oldFullPathIfAny);
606
_weakCache
.TryGetValue(projectRootElement.FullPath, out existingWeakEntry);
615
_weakCache
[projectRootElement.FullPath] = projectRootElement;
671
_weakCache
.Remove(projectRootElement.FullPath);
690
if (
_weakCache
.TryGetValue(projectRootElement.FullPath, out var cached) && cached == projectRootElement)