44 references to Packages
Microsoft.DotNet.Build.Tasks.Packaging (26)
FilterUnknownPackages.cs (1)
42isKnownPackage = packageId => index.Packages.ContainsKey(packageId);
GetLastStablePackage.cs (1)
145if (index.Packages.TryGetValue(packageId, out info))
PackageIndex.cs (14)
145foreach(var info in Packages.Values) 156foreach(var otherPackage in other.Packages) 161if (Packages.TryGetValue(otherPackage.Key, out info)) 167Packages[otherPackage.Key] = info = otherInfo; 230if (Packages.TryGetValue(assemblyName, out info)) 236Packages[assemblyName] = info = new PackageInfo(); 247if (Packages.TryGetValue(packageId, out info)) 258return Packages.Values.SelectMany(info => info.InboxOn.GetInboxFrameworks()).Distinct().ToArray(); 266if (Packages.TryGetValue(assemblyName, out info)) 286if (Packages.TryGetValue(assemblyName, out info)) 306if (Packages.TryGetValue(assemblyName, out info)) 319if (Packages.TryGetValue(packageId, out info)) 332if (Packages.TryGetValue(packageId, out info)) 352if (Packages.TryGetValue(packageId, out info))
UpdatePackageIndex.cs (6)
180foreach(var packageInfo in index.Packages.Values) 190Parallel.ForEach(index.Packages, (package) => 298if (index.Packages.TryGetValue(dllName, out identityInfo)) 313var runtimeAssemblyVersions = index.Packages 344if (!index.Packages.TryGetValue(id, out info)) 346index.Packages[id] = info = new PackageInfo();
ValidateFrameworkPackage.cs (2)
56if (!_index.Packages.TryGetValue(name, out packageInfo)) 71var missingInboxAssemblies = _index.Packages.Where(packageInfo => packageInfo.Value.InboxOn.IsAnyVersionInbox(fx) && !testAssetsByName.ContainsKey(packageInfo.Key));
ValidatePackage.cs (2)
381if (!index.Packages.TryGetValue(PackageId, out info)) 588if (_index.Packages.TryGetValue(ContractName, out packageInfo))
Microsoft.DotNet.Build.Tasks.Packaging.Tests (18)
PackageIndexTests.cs (18)
19packageIndex.Packages.Add("MyPackage", new PackageInfo()); 21packageIndex.Packages.Should().HaveCount(1); 22packageIndex.Packages.Should().ContainKey("MyPackage"); 30packageIndex.Packages.Should().HaveCount(1); 31packageIndex.Packages.Should().ContainKey("MyPackage"); 34packageIndex.Packages.Add("MyPackage", new PackageInfo()); 35packageIndex.Packages.Add("MyPackage2", new PackageInfo()); 37packageIndex.Packages.Should().HaveCount(2); 38packageIndex.Packages.Should().ContainKey("MyPackage"); 39packageIndex.Packages.Should().ContainKey("MyPackage2"); 47packageIndex.Packages.Should().HaveCount(2); 48packageIndex.Packages.Should().ContainKey("MyPackage"); 49packageIndex.Packages.Should().ContainKey("MyPackage2"); 53packageIndex.Packages.Remove("MyPackage2"); 54packageIndex.Packages.Add("MyPackage3", new PackageInfo()); 64packageIndex.Packages.Should().HaveCount(2); 65packageIndex.Packages.Should().ContainKey("MyPackage"); 66packageIndex.Packages.Should().ContainKey("MyPackage3");