3 writes to DependencyTable
Microsoft.Build.Utilities.Core (3)
TrackedDependencies\CanonicalTrackedInputFiles.cs (3)
172
DependencyTable
= new Dictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase);
624
DependencyTable
= (Dictionary<string, Dictionary<string, string>>)cachedEntry.DependencyTable;
834
DependencyTable
= new Dictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase);
37 references to DependencyTable
Microsoft.Build.Utilities.Core (16)
TrackedDependencies\CanonicalTrackedInputFiles.cs (16)
350
foreach (string tableEntryRoot in
DependencyTable
.Keys)
430
if (
DependencyTable
.TryGetValue(sourceKey, out Dictionary<string, string> dependencies))
468
bool dependenciesAvailable =
DependencyTable
.TryGetValue(sourceFullPath, out Dictionary<string, string> dependencies);
711
if (!
DependencyTable
.TryGetValue(tlogEntry, out dependencies))
720
DependencyTable
.Add(tlogEntry, dependencies);
774
if (!
DependencyTable
.TryGetValue(tlogEntry, out dependencies))
781
DependencyTable
.Add(tlogEntry, dependencies);
839
DependencyTableCache.DependencyTable[tLogRootingMarker] = new DependencyTableCacheEntry(_tlogFiles,
DependencyTable
);
887
foreach (KeyValuePair<string, Dictionary<string, string>> dependency in
DependencyTable
)
910
foreach (KeyValuePair<string, Dictionary<string, string>> dependency in
DependencyTable
)
945
DependencyTable
.Remove(rootMarkerToRemove);
950
DependencyTable
.Remove(FileUtilities.NormalizePath(sourceItem.ItemSpec));
959
public void RemoveEntryForSourceRoot(string rootingMarker) =>
DependencyTable
.Remove(rootingMarker);
991
if (
DependencyTable
.TryGetValue(rootingMarker, out Dictionary<string, string> dependencies))
1059
if (
DependencyTable
.TryGetValue(rootingMarker, out Dictionary<string, string> dependencies))
1092
DependencyTable
[rootingMarker] = dependenciesWithoutMissingFiles;
Microsoft.Build.Utilities.UnitTests (21)
TrackedDependencies\TrackedDependenciesTests.cs (21)
406
Assert.Empty(d.
DependencyTable
); // "DependencyTable should be empty."
432
Assert.Empty(d.
DependencyTable
); // "DependencyTable should be empty."
458
Assert.Empty(d.
DependencyTable
); // "DependencyTable should be empty."
484
Assert.Empty(d.
DependencyTable
); // "DependencyTable should be empty."
510
Assert.Empty(d.
DependencyTable
); // "DependencyTable should be empty."
537
Assert.NotEmpty(d.
DependencyTable
); // "Dependency Table should not be empty."
819
Assert.Equal(4, writtenInputs.
DependencyTable
[Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))].Count);
822
Assert.Equal(3, writtenInputs.
DependencyTable
[Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))].Count);
890
Assert.False(writtenInputs.
DependencyTable
[Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))].ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "one3.obj"))));
961
Assert.False(writtenInputs.
DependencyTable
[rootingMarker].ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "one3.obj"))));
1093
Assert.True(d.
DependencyTable
[Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))].ContainsKey(missing));
1116
Assert.False(d.
DependencyTable
.ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))));
1219
Assert.True(d.
DependencyTable
[Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))].ContainsKey(missing));
2735
Assert.True(d2.
DependencyTable
.Count == 1);
2736
Assert.False(d2.
DependencyTable
.ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))));
2751
Assert.True(d3.
DependencyTable
.Count == 1);
2752
Assert.False(d3.
DependencyTable
.ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))));
2948
Assert.Equal(4, d.
DependencyTable
.Count);
2951
Assert.True(d.
DependencyTable
[Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))].Values.Count == 4);
2967
Assert.Equal(4, d2.
DependencyTable
.Count);
2970
Assert.True(d2.
DependencyTable
[Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))].Values.Count == 4);