3 writes to _weakCache
Microsoft.Build (3)
Evaluation\ProjectRootElementCache.cs (3)
156
_weakCache
= new WeakValueDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
452
_weakCache
= new WeakValueDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
473
_weakCache
= new WeakValueDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
10 references to _weakCache
Microsoft.Build (10)
Evaluation\ProjectRootElementCache.cs (10)
300
_weakCache
.TryGetValue(projectFile, out projectRootElement);
472
WeakValueDictionary<string, ProjectRootElement> oldWeakCache =
_weakCache
;
487
_weakCache
[kvp.Key] = kvp.Value;
521
_weakCache
.Remove(projectRootElement.FullPath);
540
ErrorUtilities.VerifyThrow(
_weakCache
[oldFullPathIfAny] == projectRootElement, "Should already be present");
541
_weakCache
.Remove(oldFullPathIfAny);
555
_weakCache
.TryGetValue(projectRootElement.FullPath, out existingWeakEntry);
563
_weakCache
[projectRootElement.FullPath] = projectRootElement;
618
_weakCache
.Remove(projectRootElement.FullPath);
636
if (
_weakCache
.TryGetValue(projectRootElement.FullPath, out var cached) && cached == projectRootElement)