2 instantiations of PrunePackageReference
NuGet.LibraryModel (1)
PrunePackageReference.cs (1)
42return new PrunePackageReference(name, VersionRange.Parse("(," + version + "]"));
NuGet.ProjectModel (1)
JsonPackageSpecReader.Utf8JsonStreamReader.cs (1)
540packagesToPrune[propertyName] = new PrunePackageReference(propertyName, VersionRange.Parse(version));
36 references to PrunePackageReference
NuGet.Build.Tasks.Console (3)
MSBuildStaticGraphRestore.cs (3)
397internal static Dictionary<string, PrunePackageReference> GetPrunePackageReferences(IMSBuildProject project) 399var result = new Dictionary<string, PrunePackageReference>(StringComparer.OrdinalIgnoreCase); 406result.Add(id, PrunePackageReference.Create(id, versionString));
NuGet.Build.Tasks.Pack (2)
PackTaskLogic.cs (2)
1036static bool IsDependencyPruned(LibraryDependency dependency, IReadOnlyDictionary<string, PrunePackageReference> packagesToPrune) 1038if (packagesToPrune?.TryGetValue(dependency.Name, out PrunePackageReference packageToPrune) == true
NuGet.Commands (13)
RestoreCommand\DependencyGraphResolver.DependencyGraphItem.cs (3)
84IReadOnlyDictionary<string, PrunePackageReference>? packagesToPrune, 157IReadOnlyDictionary<string, PrunePackageReference>? packagesToPrune, 165if (packagesToPrune?.TryGetValue(dependency.Name, out PrunePackageReference? packageToPrune) != true
RestoreCommand\RestoreCommand.cs (1)
958if (framework.PackagesToPrune.TryGetValue(dependency.Name, out PrunePackageReference packageToPrune)
RestoreCommand\Utility\IncludeFlagUtils.cs (2)
65static bool IsDependencyPruned(LibraryDependency dependency, IReadOnlyDictionary<string, PrunePackageReference> packagesToPrune) 67if (packagesToPrune?.TryGetValue(dependency.Name, out PrunePackageReference packageToPrune) == true
RestoreCommand\Utility\MSBuildRestoreUtility.cs (4)
706var prunePackageReferences = new Dictionary<string, Dictionary<string, PrunePackageReference>>(StringComparer.OrdinalIgnoreCase); 710prunePackageReferences.Add(targetFramework.TargetAlias, new Dictionary<string, PrunePackageReference>(StringComparer.OrdinalIgnoreCase)); 768static void AddPackageToPrune(string id, string version, Dictionary<string, PrunePackageReference> frameworkInfo) 772frameworkInfo.Add(id, PrunePackageReference.Create(id, version!));
RestoreCommand\Utility\PackageSpecFactory.cs (3)
834internal static Dictionary<string, PrunePackageReference> GetPrunePackageReferences(ITargetFramework project) 836var result = new Dictionary<string, PrunePackageReference>(StringComparer.OrdinalIgnoreCase); 843result.Add(id, PrunePackageReference.Create(id, versionString));
NuGet.LibraryModel (4)
PrunePackageReference.cs (4)
15public sealed class PrunePackageReference : IEquatable<PrunePackageReference> 35public static PrunePackageReference Create(string name, string version) 66return Equals(obj as PrunePackageReference); 69public bool Equals(PrunePackageReference? other)
NuGet.ProjectModel (14)
JsonPackageSpecReader.Utf8JsonStreamReader.cs (3)
519IDictionary<string, PrunePackageReference> packagesToPrune, 1425Dictionary<string, PrunePackageReference> packagesToPrune = null; 1511packagesToPrune ??= new Dictionary<string, PrunePackageReference>(StringComparer.OrdinalIgnoreCase);
PackageSpecReferenceDependencyProvider.cs (2)
412static bool IsDependencyPruned(LibraryDependency dependency, IReadOnlyDictionary<string, PrunePackageReference> packagesToPrune) 414if (packagesToPrune?.TryGetValue(dependency.Name, out PrunePackageReference packageToPrune) == true
PackageSpecWriter.cs (1)
602private static void SetPackagesToPrune(IObjectWriter writer, IReadOnlyDictionary<string, PrunePackageReference> packagesToPrune, bool hashing)
ProjectLockFile\PackagesLockFileUtilities.cs (4)
470private static (bool, string) HasP2PDependencyChanged(IEnumerable<LibraryDependency> newDependencies, IEnumerable<ProjectRestoreReference> projectRestoreReferences, IReadOnlyDictionary<string, PrunePackageReference> dependentProjectPackagesToPrune, IReadOnlyDictionary<string, PrunePackageReference> packagesToPrune, LockFileDependency projectDependency, DependencyGraphSpec dgSpec) 542static bool IsDependencyPruned(LibraryDependency dependency, IReadOnlyDictionary<string, PrunePackageReference> packagesToPrune) 544if (packagesToPrune?.TryGetValue(dependency.Name, out PrunePackageReference packageToPrune) == true
TargetFrameworkInformation.cs (4)
27private IReadOnlyDictionary<string, PrunePackageReference> _packagesToPrune; 106public IReadOnlyDictionary<string, PrunePackageReference> PackagesToPrune 111_packagesToPrune = value ?? ImmutableDictionary<string, PrunePackageReference>.Empty; 129PackagesToPrune = ImmutableDictionary<string, PrunePackageReference>.Empty;