3 writes to _weakCache
Microsoft.Build (3)
Evaluation\ProjectRootElementCache.cs (3)
157
_weakCache
= new WeakValueDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
455
_weakCache
= new WeakValueDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
476
_weakCache
= new WeakValueDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
10 references to _weakCache
Microsoft.Build (10)
Evaluation\ProjectRootElementCache.cs (10)
301
_weakCache
.TryGetValue(projectFile, out projectRootElement);
475
WeakValueDictionary<string, ProjectRootElement> oldWeakCache =
_weakCache
;
490
_weakCache
[kvp.Key] = kvp.Value;
524
_weakCache
.Remove(projectRootElement.FullPath);
543
ErrorUtilities.VerifyThrow(
_weakCache
[oldFullPathIfAny] == projectRootElement, "Should already be present");
544
_weakCache
.Remove(oldFullPathIfAny);
558
_weakCache
.TryGetValue(projectRootElement.FullPath, out existingWeakEntry);
566
_weakCache
[projectRootElement.FullPath] = projectRootElement;
621
_weakCache
.Remove(projectRootElement.FullPath);
639
if (
_weakCache
.TryGetValue(projectRootElement.FullPath, out var cached) && cached == projectRootElement)