15 instantiations of DependencyGraphSpec
aspire-managed (1)
NuGet\Commands\RestoreCommand.cs (1)
179var dgSpec = new DependencyGraphSpec();
Microsoft.Build.NuGetSdkResolver (1)
RestoreRunnerEx.cs (1)
101var dependencyGraphSpec = new DependencyGraphSpec();
NuGet.Build.Tasks.Console (2)
MSBuildStaticGraphRestore.cs (2)
870return new DependencyGraphSpec(); 875var dependencyGraphSpec = new DependencyGraphSpec(isReadOnly: true);
NuGet.CommandLine.XPlat (1)
Commands\Package\Update\PackageUpdateCommandRunner.cs (1)
668var updatedDgSpec = new DependencyGraphSpec();
NuGet.Commands (1)
RestoreCommand\Utility\MSBuildRestoreUtility.cs (1)
60var graphSpec = new DependencyGraphSpec(readOnly);
NuGet.PackageManagement (1)
BuildIntegration\DependencyGraphRestoreUtility.cs (1)
247var dgSpec = new DependencyGraphSpec();
NuGet.ProjectModel (8)
DependencyGraphSpec.cs (8)
116var projectDependencyGraphSpec = new DependencyGraphSpec(); 148var dgSpec = new DependencyGraphSpec(); 238var newDgSpec = new DependencyGraphSpec(); 255var dgspec = new DependencyGraphSpec(); 416var newSpec = new DependencyGraphSpec(); 428var newSpec = new DependencyGraphSpec(); 442var newSpec = new DependencyGraphSpec(); 460var newSpec = new DependencyGraphSpec();
115 references to DependencyGraphSpec
aspire-managed (1)
NuGet\Commands\RestoreCommand.cs (1)
179var dgSpec = new DependencyGraphSpec();
Microsoft.Build.NuGetSdkResolver (1)
RestoreRunnerEx.cs (1)
101var dependencyGraphSpec = new DependencyGraphSpec();
NuGet.Build.Tasks (8)
BuildTasksUtility.cs (4)
43public static void AddAllProjectsForRestore(DependencyGraphSpec spec) 119DependencyGraphSpec dependencyGraphSpec, 136DependencyGraphSpec dependencyGraphSpec, 279FileUtility.Delete(Path.Combine(project.RestoreMetadata.OutputPath, DependencyGraphSpec.GetDGSpecFileName(Path.GetFileName(project.RestoreMetadata.ProjectPath))));
RestoreTask.cs (3)
176var dgFile = MSBuildRestoreUtility.GetDependencySpec(wrappedItems, readOnly: true); 247private ITaskItem[] GetFilesToEmbedInBinlog(DependencyGraphSpec dependencyGraphSpec) 272restoredProjectOutputPaths.Add(new TaskItem(Path.Combine(project.RestoreMetadata.OutputPath, DependencyGraphSpec.GetDGSpecFileName(Path.GetFileName(project.RestoreMetadata.ProjectPath)))));
WriteRestoreGraphTask.cs (1)
65var dgFile = MSBuildRestoreUtility.GetDependencySpec(wrappedItems);
NuGet.Build.Tasks.Console (10)
MSBuildStaticGraphRestore.cs (10)
108var dependencyGraphSpec = GetDependencyGraphSpec(entryProjectFilePath, globalProperties, interactive, binaryLoggerParameters, EnvironmentVariableWrapper.Instance); 116static bool HasProjectToRestore(DependencyGraphSpec dgSpec, bool restorePackagesConfig) 194var dependencyGraphSpec = GetDependencyGraphSpec(entryProjectFilePath, globalProperties, interactive, binaryLoggerParameters, EnvironmentVariableWrapper.Instance); 786/// Gets a <see cref="DependencyGraphSpec" /> for the specified project. 791/// <returns>A <see cref="DependencyGraphSpec" /> for the specified project if they could be loaded, otherwise <code>null</code>.</returns> 792private DependencyGraphSpec GetDependencyGraphSpec(string entryProjectPath, IDictionary<string, string> globalProperties, bool interactive, string binaryLoggerParameters, IEnvironmentVariableReader environmentVariableReader) 848private DependencyGraphSpec GetDependencyGraphSpec<TProject>( 875var dependencyGraphSpec = new DependencyGraphSpec(isReadOnly: true); 1347private void LogFilesToEmbedInBinlog(DependencyGraphSpec dependencyGraphSpec, IReadOnlyDictionary<string, string> options) 1372LoggingQueue.Enqueue(new ConsoleOutLogEmbedInBinlog(Path.Combine(project.RestoreMetadata.OutputPath, DependencyGraphSpec.GetDGSpecFileName(Path.GetFileName(project.RestoreMetadata.ProjectPath)))));
NuGet.CommandLine.XPlat (24)
Commands\Package\Update\IPackageUpdateIO.cs (3)
28DependencyGraphSpec? GetDependencyGraphSpec(string project); 38DependencyGraphSpec dgSpec, 119Task<LockFile> GetProjectAssetsFileAsync(DependencyGraphSpec dgSpec, string projectPath, ILogger logger, CancellationToken cancellationToken);
Commands\Package\Update\PackageUpdateCommandRunner.cs (8)
59var dgSpec = packageUpdateIO.GetDependencyGraphSpec(args.Project); 90var updatedDgSpec = GetUpdatedDependencyGraphSpec(dgSpec, projectPackageUpdates); 129DependencyGraphSpec dgSpec, 248DependencyGraphSpec dgSpec, 351DependencyGraphSpec dgSpec, 666private static DependencyGraphSpec GetUpdatedDependencyGraphSpec(DependencyGraphSpec currentDgSpec, Dictionary<string, List<PackageUpdateResult>> projectPackageUpdates) 668var updatedDgSpec = new DependencyGraphSpec();
Commands\Package\Update\PackageUpdateIO.cs (7)
64public DependencyGraphSpec? GetDependencyGraphSpec(string project) 74DependencyGraphSpec result = DependencyGraphSpec.Load(tempFile); 130/// <inheritdoc cref="IPackageUpdateIO.PreviewUpdatePackageReferenceAsync(DependencyGraphSpec, ILogger, CancellationToken)"/> 132DependencyGraphSpec dgSpec, 449/// <inheritdoc cref="IPackageUpdateIO.GetProjectAssetsFileAsync(DependencyGraphSpec, string, ILogger, CancellationToken)"/> 451DependencyGraphSpec dgSpec,
Commands\PackageReferenceCommands\AddPackageReferenceCommandRunner.cs (6)
69var dgSpec = ReadProjectDependencyGraph(packageReferenceArgs); 192var updatedDgSpec = dgSpec.WithReplacedSpec(updatedPackageSpec).WithoutRestores(); 405DependencyGraphSpec dgSpec) 443private static DependencyGraphSpec ReadProjectDependencyGraph(PackageReferenceArgs packageReferenceArgs) 445DependencyGraphSpec spec = null; 449spec = DependencyGraphSpec.Load(packageReferenceArgs.DgFilePath);
NuGet.Commands (27)
RestoreCommand\RequestFactory\DependencyGraphFileRequestProvider.cs (2)
27var dgSpec = DependencyGraphSpec.Load(inputPath);
RestoreCommand\RequestFactory\DependencyGraphSpecRequestProvider.cs (7)
28private readonly DependencyGraphSpec _dgFile; 35DependencyGraphSpec dgFile) 44DependencyGraphSpec dgFile, 59private IReadOnlyList<RestoreSummaryRequest> GetRequestsFromItems(RestoreArgs restoreContext, DependencyGraphSpec dgFile) 99DependencyGraphSpec projectDependencyGraphSpec = dgFile.CreateFromClosure(projectNameToRestore, closure); 135public static IEnumerable<ExternalProjectReference> GetExternalClosure(DependencyGraphSpec dgFile, string projectNameToRestore) 163DependencyGraphSpec projectDgSpec,
RestoreCommand\RestoreCommand.cs (1)
1462var noOpDgSpec = NoOpRestoreUtilities.GetNoOpDgSpec(_request);
RestoreCommand\RestoreRequest.cs (1)
54public DependencyGraphSpec DependencyGraphSpec { get; set; }
RestoreCommand\RestoreResult.cs (2)
102private readonly DependencyGraphSpec _dependencyGraphSpec; 121DependencyGraphSpec dependencyGraphSpec,
RestoreCommand\Utility\MSBuildRestoreUtility.cs (9)
36/// Creates a <see cref="DependencyGraphSpec" /> from the specified MSBuild items. 39public static DependencyGraphSpec GetDependencySpec(IEnumerable<IMSBuildItem> items) 44/// Creates a <see cref="DependencyGraphSpec" /> from the specified MSBuild items. 47/// <param name="readOnly"><see langword="true" /> to indicate that the <see cref="DependencyGraphSpec" /> is considered read-only and won't be changed, otherwise <see langword="false" />.</param> 48public static DependencyGraphSpec GetDependencySpec(IEnumerable<IMSBuildItem> items, bool readOnly) 60var graphSpec = new DependencyGraphSpec(readOnly); 310public static void RemoveMissingProjects(DependencyGraphSpec graphSpec) 332public static void NormalizePathCasings(Dictionary<string, string> paths, DependencyGraphSpec graphSpec) 340public static void NormalizePathCasings(IDictionary<string, string> paths, DependencyGraphSpec graphSpec)
RestoreCommand\Utility\NoOpRestoreUtilities.cs (3)
200internal static DependencyGraphSpec GetNoOpDgSpec(RestoreRequest request) 204var dgSpec = request.DependencyGraphSpec.WithProjectClosure(request.DependencyGraphSpec.Restore.First()); 233var dgFileName = DependencyGraphSpec.GetDGSpecFileName(projFileName);
RestoreCommand\Utility\SpecValidationUtility.cs (2)
23public static void ValidateDependencySpec(DependencyGraphSpec spec) 28public static void ValidateDependencySpec(DependencyGraphSpec spec, HashSet<string> projectsToSkip, ILogger logger)
NuGet.PackageManagement (20)
BuildIntegration\BuildIntegratedRestoreUtility.cs (1)
113DependencyGraphSpec cache)
BuildIntegration\DependencyGraphRestoreUtility.cs (12)
35DependencyGraphSpec dgSpec, 65DependencyGraphSpec dgSpec, 127var dgFile = await GetSolutionRestoreSpec(solutionManager, context); 178var dgFile = await GetSolutionRestoreSpec(solutionManager, context); 214DependencyGraphSpec solutionDgSpec) 235public static async Task<DependencyGraphSpec> GetSolutionRestoreSpec( 243public static async Task<(DependencyGraphSpec dgSpec, IReadOnlyList<IAssetsLogMessage> additionalMessages)> GetSolutionRestoreSpecAndAdditionalMessages( 247var dgSpec = new DependencyGraphSpec(); 278var dgFileName = DependencyGraphSpec.GetDGSpecFileName(projFileName); 292var persistedDGSpec = DependencyGraphSpec.Load(persistedDGSpecPath); 321DependencyGraphSpec dgFile,
DependencyGraphCacheContext.cs (2)
31public Dictionary<string, DependencyGraphSpec> DependencyGraphCache { get; set; } = 32new Dictionary<string, DependencyGraphSpec>(StringComparer.Ordinal);
IDependencyGraphProject.cs (1)
13/// Represents the interface necessary for adding a project to a <see cref="DependencyGraphSpec"/>-based restore.
NuGetPackageManager.cs (4)
50private DependencyGraphSpec _buildIntegratedProjectsCache; 2432var dgFile = await DependencyGraphRestoreUtility.GetSolutionRestoreSpec(SolutionManager, referenceContext); 2434var allSortedProjects = DependencyGraphSpec.SortPackagesByDependencyOrder(dgFile.Projects); 3451var dgSpecForParents = await DependencyGraphRestoreUtility.GetSolutionRestoreSpec(SolutionManager, referenceContext);
NuGet.ProjectModel (24)
DependencyGraphSpec.cs (21)
114public DependencyGraphSpec WithProjectClosure(string projectUniqueName) 116var projectDependencyGraphSpec = new DependencyGraphSpec(); 128/// Creates a new <see cref="DependencyGraphSpec" /> from a project name and project closure. 132/// <returns>A <see cref="DependencyGraphSpec" />.</returns> 136public DependencyGraphSpec CreateFromClosure(string projectUniqueName, IReadOnlyList<PackageSpec> closure) 148var dgSpec = new DependencyGraphSpec(); 230public static DependencyGraphSpec Union(IEnumerable<DependencyGraphSpec> dgSpecs) 238var newDgSpec = new DependencyGraphSpec(); 246public static DependencyGraphSpec Load(string path) 255var dgspec = new DependencyGraphSpec(); 295private static void ParseRestoreSection(DependencyGraphSpec dgspec, ref Utf8JsonStreamReader jsonReader) 312private static void ParseProjectsSection(DependencyGraphSpec dgspec, ref Utf8JsonStreamReader jsonReader, string path) 414public DependencyGraphSpec WithoutRestores() 416var newSpec = new DependencyGraphSpec(); 426public DependencyGraphSpec WithReplacedSpec(PackageSpec project) 428var newSpec = new DependencyGraphSpec(); 440public DependencyGraphSpec WithPackageSpecs(IEnumerable<PackageSpec> packageSpecs) 442var newSpec = new DependencyGraphSpec(); 458public DependencyGraphSpec WithoutTools() 460var newSpec = new DependencyGraphSpec();
ProjectLockFile\PackagesLockFileUtilities.cs (3)
74/// <param name="dgSpec">The <see cref="DependencyGraphSpec"/> for the new project defintion.</param> 78public static LockFileValidationResult IsLockFileValid(DependencyGraphSpec dgSpec, PackagesLockFile nuGetLockFile) 470private static (bool, string) HasP2PDependencyChanged(IEnumerable<LibraryDependency> newDependencies, IEnumerable<ProjectRestoreReference> projectRestoreReferences, IReadOnlyDictionary<string, PrunePackageReference> dependentProjectPackagesToPrune, IReadOnlyDictionary<string, PrunePackageReference> packagesToPrune, LockFileDependency projectDependency, DependencyGraphSpec dgSpec)