6 writes to _cache
Microsoft.Build.Tasks.Core (3)
AssemblyDependency\ResolveAssemblyReference.cs (3)
2052
_cache
= SystemState.DeserializeCache<SystemState>(_stateFile, Log);
2057
_cache
= SystemState.DeserializePrecomputedCaches(AssemblyInformationCachePaths, Log, fileExists);
2062
_cache
= new SystemState();
Microsoft.Build.Tasks.UnitTests (3)
RARPrecomputedCache_Tests.cs (3)
28
_cache
= new SystemState()
63
_cache
= new SystemState()
114
_cache
= new SystemState()
32 references to _cache
Microsoft.Build.Tasks.Core (15)
AssemblyDependency\ResolveAssemblyReference.cs (15)
2055
if (
_cache
== null && AssemblyInformationCachePaths != null && AssemblyInformationCachePaths.Length > 0)
2060
if (
_cache
== null)
2073
_cache
.SerializePrecomputedCache(AssemblyInformationCacheOutputPath, Log);
2075
else if (!string.IsNullOrEmpty(_stateFile) && (
_cache
.IsDirty ||
_cache
.instanceLocalOutgoingFileStateCache.Count <
_cache
.instanceLocalFileStateCache.Count))
2079
_cache
.SerializeCache(_stateFile, Log);
2308
_cache
.SetInstalledAssemblyInformation(installedAssemblyTableInfo);
2311
getAssemblyMetadata =
_cache
.CacheDelegate(getAssemblyMetadata);
2312
fileExists =
_cache
.CacheDelegate();
2313
directoryExists =
_cache
.CacheDelegate(directoryExists);
2314
getDirectories =
_cache
.CacheDelegate(getDirectories);
2319
_cache
.SetGetLastWriteTime(path =>
2332
getAssemblyName =
_cache
.CacheDelegate(path =>
2339
getRuntimeVersion =
_cache
.CacheDelegate(path =>
Microsoft.Build.Tasks.UnitTests (17)
RARPrecomputedCache_Tests.cs (17)
30
t.
_cache
.instanceLocalFileStateCache = new Dictionary<string, SystemState.FileState>() {
33
t.
_cache
.SetGetLastWriteTime(_ => now);
34
_ = t.
_cache
.GetFileState("assembly1");
35
_ = t.
_cache
.GetFileState("assembly2");
36
t.
_cache
.IsDirty = true;
44
t.
_cache
.IsDirty = true;
65
rarWriterTask.
_cache
.instanceLocalFileStateCache = new() {
68
rarWriterTask.
_cache
.SetGetLastWriteTime(_ => now);
70
_ = rarWriterTask.
_cache
.GetFileState("path1");
71
rarWriterTask.
_cache
.IsDirty = true;
76
rarWriterTask.
_cache
.instanceLocalFileStateCache.Add(dllName,
86
rarWriterTask.
_cache
.IsDirty = true;
102
rarReaderTask.
_cache
.instanceLocalFileStateCache.ShouldNotContainKey(dllName);
117
rarWriterTask.
_cache
.instanceLocalFileStateCache = new Dictionary<string, SystemState.FileState>() {
127
rarWriterTask.
_cache
.IsDirty = true;
144
rarReaderTask.
_cache
.instanceLocalFileStateCache.ShouldContainKey(dllName);
145
SystemState.FileState assembly3 = rarReaderTask.
_cache
.instanceLocalFileStateCache[dllName];