2 instantiations of RestoreTargetGraph
NuGet.Commands (2)
RestoreCommand\DependencyGraphResolver.cs (1)
741RestoreTargetGraph restoreTargetGraph = new(
RestoreCommand\RestoreTargetGraph.cs (1)
195return new RestoreTargetGraph(
111 references to RestoreTargetGraph
NuGet.CommandLine.XPlat (1)
Commands\PackageReferenceCommands\AddPackageReferenceCommandRunner.cs (1)
474foreach (var restoreGraph in restoreGraphs)
NuGet.Commands (110)
RestoreCommand\CompatibilityChecker.cs (5)
40RestoreTargetGraph graph, 233private static RestoreLogMessage GetErrorMessage(NuGetLogCode logCode, CompatibilityIssue issue, RestoreTargetGraph graph) 240RestoreTargetGraph graph) 341private async Task VerifyDotnetToolCompatibilityChecks(CompatibilityData compatibilityData, GraphItem<RemoteResolveResult> node, RestoreTargetGraph graph, List<CompatibilityIssue> issues) 368private CompatibilityData GetCompatibilityData(RestoreTargetGraph graph, LibraryIdentity libraryId, PackageSpec packageSpec)
RestoreCommand\CompatibilityCheckResult.cs (2)
14public RestoreTargetGraph Graph { get; } 20public CompatibilityCheckResult(RestoreTargetGraph graph, IEnumerable<CompatibilityIssue> issues)
RestoreCommand\DependencyGraphResolver.cs (12)
108/// <item>A <see cref="List{T}" /> of <see cref="RestoreTargetGraph" /> objects representing the resolved dependency graphs for each pair of target framework and runtime identifier.</item> 112public async Task<ValueTuple<bool, List<RestoreTargetGraph>, RuntimeGraph>> ResolveAsync( 132List<RestoreTargetGraph> allGraphs = new(); 135Dictionary<string, RestoreTargetGraph> graphsByTargetFramework = new(); 138List<RestoreTargetGraph> runtimeGraphs = new(); 221(bool wasRestoreTargetGraphCreationSuccessful, RestoreTargetGraph restoreTargetGraph) = await CreateRestoreTargetGraphAsync(frameworkRuntimeDefinition, runtimeGraph, isCentralPackageTransitivePinningEnabled, unresolvedPackages, resolvedPackages, resolvedDependencyGraphItems, context); 299/// Creates a <see cref="RestoreTargetGraph" /> from the resolved dependency graph items and analyzes the graph for cycles, downgrades, and conflicts. 310/// <item>A <see cref="RestoreTargetGraph" /> representing the fully resolved and analyzed dependency graph.</item> 313private static async Task<(bool Success, RestoreTargetGraph RestoreTargetGraph)> CreateRestoreTargetGraphAsync( 741RestoreTargetGraph restoreTargetGraph = new( 1427private bool TryGetRuntimeGraph(List<NuGetv3LocalRepository> localRepositories, Dictionary<string, RestoreTargetGraph> graphsByTargetAlias, FrameworkRuntimeDefinition frameworkRuntimeDefinition, TargetFrameworkInformation? projectTargetFramework, [NotNullWhen(true)] out RuntimeGraph? runtimeGraph) 1431if (string.IsNullOrEmpty(frameworkRuntimeDefinition.RuntimeIdentifier) || !graphsByTargetAlias.TryGetValue(frameworkRuntimeDefinition.TargetAlias, out RestoreTargetGraph? restoreTargetGraphForTargetFramework))
RestoreCommand\Diagnostics\DiagnosticUtility.cs (1)
66public static string FormatGraphName(RestoreTargetGraph graph)
RestoreCommand\LockFileBuilder.cs (12)
27private readonly Dictionary<RestoreTargetGraph, Dictionary<string, LibraryIncludeFlags>> _includeFlagGraphs; 31Dictionary<RestoreTargetGraph, 41IEnumerable<RestoreTargetGraph> targetGraphs, 161foreach (var targetGraph in targetGraphs 427private static void AddProjectFileDependenciesForPackageReference(PackageSpec project, LockFile lockFile, List<RestoreTargetGraph> targetGraphs) 438RestoreTargetGraph targetGraph = !string.IsNullOrEmpty(frameworkInfo.TargetAlias) ? 480private void AddCentralTransitiveDependencyGroupsForPackageReference(PackageSpec project, LockFile lockFile, IEnumerable<RestoreTargetGraph> targetGraphs, ILogger logger) 489foreach (RestoreTargetGraph targetGraph in targetGraphs.Where(targetGraph => string.IsNullOrEmpty(targetGraph.RuntimeIdentifier))) 515/// Determines the <see cref="LibraryDependency" /> objects for the specified <see cref="RestoreTargetGraph" /> that represent the centrally defined transitive dependencies. 517/// <param name="targetGraph">The <see cref="RestoreTargetGraph" /> to get centrally defined transitive dependencies for.</param> 520/// <returns>An <see cref="IEnumerable{LibraryDependency}" /> representing the centrally defined transitive dependencies for the specified <see cref="RestoreTargetGraph" />.</returns> 521private IEnumerable<LibraryDependency> GetLibraryDependenciesForCentralTransitiveDependencies(RestoreTargetGraph targetGraph, TargetFrameworkInformation targetFrameworkInformation, ILogger logger)
RestoreCommand\LockFileBuilderCache.cs (4)
43/// For performance reasons(detecting AssetTargetFallback warnings), this is not used in the current restore code. <see cref="GetLabeledSelectionCriteria(RestoreTargetGraph, NuGetFramework)"/> is used instead. 46public List<List<SelectionCriteria>> GetSelectionCriteria(RestoreTargetGraph graph, NuGetFramework framework) 67internal List<(List<SelectionCriteria>, bool)> GetLabeledSelectionCriteria(RestoreTargetGraph graph, NuGetFramework framework) 109internal (LockFileTargetLibrary, bool, NuGetFramework, NuGetFramework) GetLockFileTargetLibrary(RestoreTargetGraph graph, NuGetFramework framework, LocalPackageInfo localPackageInfo, string aliases, LibraryIncludeFlags libraryIncludeFlags, List<LibraryDependency> dependencies, Func<(LockFileTargetLibrary, bool, NuGetFramework, NuGetFramework)> valueFactory)
RestoreCommand\Logging\RestoreCollectorLogger.cs (2)
24private IEnumerable<RestoreTargetGraph> _restoreTargetGraphs; 82public void ApplyRestoreOutput(IEnumerable<RestoreTargetGraph> restoreTargetGraphs)
RestoreCommand\Logging\TransitiveNoWarnUtils.cs (3)
28IEnumerable<RestoreTargetGraph> targetGraphs, 44foreach (var targetGraph in targetGraphs) 85RestoreTargetGraph targetGraph,
RestoreCommand\OriginalCaseGlobalPackageFolder.cs (2)
62public async Task CopyPackagesToOriginalCaseAsync(IEnumerable<RestoreTargetGraph> graphs, CancellationToken token) 71foreach (var graph in graphs)
RestoreCommand\ProjectRestoreCommand.cs (17)
45public async Task<Tuple<bool, List<RestoreTargetGraph>, RuntimeGraph>> TryRestoreAsync(LibraryRange projectRange, 58var frameworkTasks = new List<Task<RestoreTargetGraph>>(); 59var graphs = new List<RestoreTargetGraph>(); 111var runtimeGraphs = new List<RestoreTargetGraph>(); 112var runtimeTasks = new List<Task<RestoreTargetGraph[]>>(); 114foreach (var graph in graphs) 146foreach (var runtimeSpecificGraph in (await Task.WhenAll(runtimeTasks)).SelectMany(g => g)) 256private Task<RestoreTargetGraph> WalkDependenciesAsync(LibraryRange projectRange, 273private async Task<RestoreTargetGraph> WalkDependenciesAsync(LibraryRange projectRange, 299return RestoreTargetGraph.Create(runtimeGraph, graphs, context, targetAlias, framework, runtimeIdentifier); 302internal async Task<bool> ResolutionSucceeded(IEnumerable<RestoreTargetGraph> graphs, IList<DownloadDependencyResolutionResult> downloadDependencyResults, RemoteWalkContext context, CancellationToken token) 305foreach (var graph in graphs) 348IEnumerable<RestoreTargetGraph> graphs, 457private Task<RestoreTargetGraph[]> WalkRuntimeDependenciesAsync(LibraryRange projectRange, 458RestoreTargetGraph graph, 465var resultGraphs = new List<Task<RestoreTargetGraph>>(); 486internal static RuntimeGraph GetRuntimeGraph(RestoreTargetGraph graph, IReadOnlyList<NuGetv3LocalRepository> localRepositories, RuntimeGraph projectRuntimeGraph, RestoreCollectorLogger logger)
RestoreCommand\RestoreCommand.cs (33)
42private readonly Dictionary<RestoreTargetGraph, Dictionary<string, LibraryIncludeFlags>> _includeFlagGraphs 43= new Dictionary<RestoreTargetGraph, Dictionary<string, LibraryIncludeFlags>>(); 259(successfulResult, List<RestoreTargetGraph> graphs) = await GenerateRestoreGraphsAsync(telemetry, contextForProject, success, token); 586private async Task<(bool, List<RestoreTargetGraph>)> GenerateRestoreGraphsAsync(TelemetryActivity telemetry, RemoteWalkContext contextForProject, bool success, CancellationToken token) 588List<RestoreTargetGraph> graphs = null; 625var restoreTargetGraph = RestoreTargetGraph.Create(_request.Project.RuntimeGraph, Enumerable.Empty<GraphNode<RemoteResolveResult>>(), contextForProject, frameworkRuntimePairs[i].TargetAlias, frameworkRuntimePairs[i].Framework, frameworkRuntimePairs[i].RuntimeIdentifier); 633private async Task<(bool, IEnumerable<MSBuildOutputFile>, string, string, LockFile, List<RestoreTargetGraph>, PackagesLockFile, string, CacheFile)> ProcessRestoreResultAsync(TelemetryActivity telemetry, 639List<RestoreTargetGraph> graphs, 789private async Task<bool> PerformAuditAsync(List<RestoreTargetGraph> graphs, TelemetryActivity telemetry, CancellationToken token) 1555IEnumerable<RestoreTargetGraph> graphs, 1577List<RestoreTargetGraph> graphs, 1613private async Task<bool> ValidateRestoreGraphsAsync(IEnumerable<RestoreTargetGraph> graphs, ILogger logger) 1636private static async Task<bool> ValidateCyclesAsync(IEnumerable<RestoreTargetGraph> graphs, ILogger logger) 1638foreach (var graph in graphs) 1654private async Task<bool> ValidateConflictsAsync(IEnumerable<RestoreTargetGraph> graphs, ILogger logger) 1656foreach (var graph in graphs) 1698internal static Task LogDowngradeWarningsOrErrorsAsync(IEnumerable<RestoreTargetGraph> graphs, ILogger logger) 1702foreach (var graph in graphs) 1757Dictionary<RestoreTargetGraph, Dictionary<string, LibraryIncludeFlags>> includeFlagGraphs, 1760IEnumerable<RestoreTargetGraph> graphs, 1769foreach (var graph in graphs) 1803private async Task<(bool, List<RestoreTargetGraph>)> ExecuteLegacyRestoreAsync( 1849var allGraphs = new List<RestoreTargetGraph>(); 1861Tuple<bool, List<RestoreTargetGraph>, RuntimeGraph> result = null; 1910allGraphs.Add(RestoreTargetGraph.Create(_request.Project.RuntimeGraph, Enumerable.Empty<GraphNode<RemoteResolveResult>>(), context, frameworkRuntimePair.TargetAlias, frameworkRuntimePair.Framework, frameworkRuntimePair.RuntimeIdentifier)); 1944Tuple<bool, List<RestoreTargetGraph>, RuntimeGraph> compatibilityResult = null; 1971foreach (var graph in compatibilityResult.Item2) 1988private async Task<(bool, List<RestoreTargetGraph>)> ExecuteRestoreAsync( 2041List<RestoreTargetGraph> graphs = null; 2049(bool Success, List<RestoreTargetGraph> Graphs, RuntimeGraph Runtimes) result = await dependencyGraphResolver.ResolveAsync(userPackageFolder, fallbackPackageFolders, context, projectRestoreCommand, localRepositories, token); 2070graphs = new List<RestoreTargetGraph>(); 2076graphs.Add(RestoreTargetGraph.Create(_request.Project.RuntimeGraph, Enumerable.Empty<GraphNode<RemoteResolveResult>>(), context, frameworkRuntimePair.TargetAlias, frameworkRuntimePair.Framework, frameworkRuntimePair.RuntimeIdentifier));
RestoreCommand\RestoreResult.cs (2)
31public IEnumerable<RestoreTargetGraph> RestoreGraphs { get; } 110IEnumerable<RestoreTargetGraph> restoreGraphs,
RestoreCommand\RestoreTargetGraph.cs (1)
112internal static RestoreTargetGraph Create(
RestoreCommand\Utility\AuditUtility.cs (4)
26private readonly List<RestoreTargetGraph> _targetGraphs; 65List<RestoreTargetGraph> graphs, 220foreach (RestoreTargetGraph graph in _targetGraphs) 378foreach (RestoreTargetGraph graph in _targetGraphs)
RestoreCommand\Utility\BuildAssetsUtils.cs (3)
435IEnumerable<RestoreTargetGraph> targetGraphs, 499RestoreTargetGraph targetGraph = null; 500foreach (RestoreTargetGraph graph in targetGraphs)
RestoreCommand\Utility\IncludeFlagUtils.cs (4)
19Dictionary<RestoreTargetGraph, Dictionary<string, LibraryIncludeFlags>> includeFlagGraphs, 21RestoreTargetGraph graph) 34RestoreTargetGraph targetGraph, 78RestoreTargetGraph targetGraph,
RestoreCommand\Utility\LockFileUtils.cs (3)
34RestoreTargetGraph targetGraph, 65RestoreTargetGraph targetGraph, 492RestoreTargetGraph targetGraph,