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);
467
_weakCache
= new WeakValueDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
10 references to _weakCache
Microsoft.Build (10)
Evaluation\ProjectRootElementCache.cs (10)
296
_weakCache
.TryGetValue(projectFile, out projectRootElement);
466
WeakValueDictionary<string, ProjectRootElement> oldWeakCache =
_weakCache
;
481
_weakCache
[kvp.Key] = kvp.Value;
515
_weakCache
.Remove(projectRootElement.FullPath);
534
Assumed.Equal(
_weakCache
[oldFullPathIfAny], projectRootElement, "Should already be present");
535
_weakCache
.Remove(oldFullPathIfAny);
549
_weakCache
.TryGetValue(projectRootElement.FullPath, out existingWeakEntry);
557
_weakCache
[projectRootElement.FullPath] = projectRootElement;
612
_weakCache
.Remove(projectRootElement.FullPath);
630
if (
_weakCache
.TryGetValue(projectRootElement.FullPath, out var cached) && cached == projectRootElement)