3 writes to DependencyTable
Microsoft.Build.Utilities.Core (3)
TrackedDependencies\CanonicalTrackedOutputFiles.cs (3)
85DependencyTable = new Dictionary<string, Dictionary<string, DateTime>>(StringComparer.OrdinalIgnoreCase); 138DependencyTable = (Dictionary<string, Dictionary<string, DateTime>>)cachedEntry.DependencyTable; 250DependencyTable = new Dictionary<string, Dictionary<string, DateTime>>(StringComparer.OrdinalIgnoreCase);
43 references to DependencyTable
Microsoft.Build.Utilities.Core (20)
TrackedDependencies\CanonicalTrackedInputFiles.cs (1)
476if (_outputs.DependencyTable.TryGetValue(sourceFullPath, out Dictionary<string, DateTime> outputFiles))
TrackedDependencies\CanonicalTrackedOutputFiles.cs (19)
185if (!DependencyTable.TryGetValue(tlogEntry, out Dictionary<string, DateTime> dependencies)) 188DependencyTable.Add(tlogEntry, dependencies); 255DependencyTableCache.DependencyTable[tLogRootingMarker] = new DependencyTableCacheEntry(_tlogFiles, DependencyTable); 280if (DependencyTable.TryGetValue(currentRoot, out Dictionary<string, DateTime> currentOutputs)) 285foreach (KeyValuePair<string, Dictionary<string, DateTime>> root in DependencyTable) 305DependencyTable.Remove(removedMarker); 319if (DependencyTable.TryGetValue(sourceRoot, out var outputPaths)) 323if (DependencyTable[sourceRoot].Count == 0) 325DependencyTable.Remove(sourceRoot); 423foreach (string tableEntryRoot in DependencyTable.Keys) 478if (DependencyTable.TryGetValue(sourceKey, out Dictionary<string, DateTime> dependencies)) 537if (!DependencyTable.TryGetValue(sourceKey, out Dictionary<string, DateTime> dependencies)) 540DependencyTable.Add(sourceKey, dependencies); 597foreach (KeyValuePair<string, Dictionary<string, DateTime>> kvp in DependencyTable) 646DependencyTable.Remove(rootMarkerToRemove); 651DependencyTable.Remove(FileUtilities.NormalizePath(sourceItem.ItemSpec)); 685if (DependencyTable.TryGetValue(rootingMarker, out Dictionary<string, DateTime> dependencies)) 753if (DependencyTable.TryGetValue(rootingMarker, out Dictionary<string, DateTime> dependencies)) 786DependencyTable[rootingMarker] = dependenciesWithoutMissingFiles;
Microsoft.Build.Utilities.UnitTests (23)
TrackedDependencies\TrackedDependenciesTests.cs (23)
552Assert.Empty(d.DependencyTable); // "DependencyTable should be empty." 569Assert.Empty(d.DependencyTable); // "DependencyTable should be empty." 586Assert.Empty(d.DependencyTable); // "DependencyTable should be empty." 603Assert.Empty(d.DependencyTable); // "DependencyTable should be empty." 620Assert.Empty(d.DependencyTable); // "DependencyTable should be empty." 818Assert.Single(writtenOutputs.DependencyTable[Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))]); 821Assert.Equal(2, writtenOutputs.DependencyTable[Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))].Count); 867Assert.False(writtenOutputs.DependencyTable[Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))].ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "one3.obj")))); 938Assert.False(writtenOutputs.DependencyTable[rootingMarker].ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "one3.obj")))); 999Assert.True(outputs.DependencyTable.ContainsKey(rootingMarker1)); 1000Assert.True(outputs.DependencyTable.ContainsKey(rootingMarker2)); 1001Assert.True(outputs.DependencyTable.ContainsKey(rootingMarker3)); 1005Assert.True(outputs.DependencyTable.ContainsKey(rootingMarker1)); 1006Assert.True(outputs.DependencyTable.ContainsKey(rootingMarker2)); 1007Assert.False(outputs.DependencyTable.ContainsKey(rootingMarker3)); 1045Assert.True(outputs.DependencyTable.ContainsKey(rootingMarker1)); 1046Assert.True(outputs.DependencyTable.ContainsKey(rootingMarker2)); 1047Assert.True(outputs.DependencyTable.ContainsKey(rootingMarker3)); 1051Assert.True(outputs.DependencyTable.ContainsKey(rootingMarker1)); 1052Assert.True(outputs.DependencyTable.ContainsKey(rootingMarker2)); 1053Assert.True(outputs.DependencyTable.ContainsKey(rootingMarker3)); 2542Assert.Single(outputs.DependencyTable[threeRootingMarker]); 2543Assert.False(outputs.DependencyTable[threeRootingMarker].ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "three.obj"))));