2 instantiations of RestoreTargetGraph
NuGet.Commands (2)
RestoreCommand\DependencyGraphResolver.cs (1)
741
RestoreTargetGraph restoreTargetGraph =
new
(
RestoreCommand\RestoreTargetGraph.cs (1)
195
return new
RestoreTargetGraph
(
111 references to RestoreTargetGraph
NuGet.CommandLine.XPlat (1)
Commands\PackageReferenceCommands\AddPackageReferenceCommandRunner.cs (1)
474
foreach (
var
restoreGraph in restoreGraphs)
NuGet.Commands (110)
RestoreCommand\CompatibilityChecker.cs (5)
40
RestoreTargetGraph
graph,
233
private static RestoreLogMessage GetErrorMessage(NuGetLogCode logCode, CompatibilityIssue issue,
RestoreTargetGraph
graph)
240
RestoreTargetGraph
graph)
341
private async Task VerifyDotnetToolCompatibilityChecks(CompatibilityData compatibilityData, GraphItem<RemoteResolveResult> node,
RestoreTargetGraph
graph, List<CompatibilityIssue> issues)
368
private CompatibilityData GetCompatibilityData(
RestoreTargetGraph
graph, LibraryIdentity libraryId, PackageSpec packageSpec)
RestoreCommand\CompatibilityCheckResult.cs (2)
14
public
RestoreTargetGraph
Graph { get; }
20
public 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>
112
public async Task<ValueTuple<bool, List<
RestoreTargetGraph
>, RuntimeGraph>> ResolveAsync(
132
List<
RestoreTargetGraph
> allGraphs = new();
135
Dictionary<string,
RestoreTargetGraph
> graphsByTargetFramework = new();
138
List<
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>
313
private static async Task<(bool Success,
RestoreTargetGraph
RestoreTargetGraph)> CreateRestoreTargetGraphAsync(
741
RestoreTargetGraph
restoreTargetGraph = new(
1427
private bool TryGetRuntimeGraph(List<NuGetv3LocalRepository> localRepositories, Dictionary<string,
RestoreTargetGraph
> graphsByTargetAlias, FrameworkRuntimeDefinition frameworkRuntimeDefinition, TargetFrameworkInformation? projectTargetFramework, [NotNullWhen(true)] out RuntimeGraph? runtimeGraph)
1431
if (string.IsNullOrEmpty(frameworkRuntimeDefinition.RuntimeIdentifier) || !graphsByTargetAlias.TryGetValue(frameworkRuntimeDefinition.TargetAlias, out
RestoreTargetGraph
? restoreTargetGraphForTargetFramework))
RestoreCommand\Diagnostics\DiagnosticUtility.cs (1)
66
public static string FormatGraphName(
RestoreTargetGraph
graph)
RestoreCommand\LockFileBuilder.cs (12)
27
private readonly Dictionary<
RestoreTargetGraph
, Dictionary<string, LibraryIncludeFlags>> _includeFlagGraphs;
31
Dictionary<
RestoreTargetGraph
,
41
IEnumerable<
RestoreTargetGraph
> targetGraphs,
161
foreach (
var
targetGraph in targetGraphs
427
private static void AddProjectFileDependenciesForPackageReference(PackageSpec project, LockFile lockFile, List<
RestoreTargetGraph
> targetGraphs)
438
RestoreTargetGraph
targetGraph = !string.IsNullOrEmpty(frameworkInfo.TargetAlias) ?
480
private void AddCentralTransitiveDependencyGroupsForPackageReference(PackageSpec project, LockFile lockFile, IEnumerable<
RestoreTargetGraph
> targetGraphs, ILogger logger)
489
foreach (
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>
521
private 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.
46
public List<List<SelectionCriteria>> GetSelectionCriteria(
RestoreTargetGraph
graph, NuGetFramework framework)
67
internal List<(List<SelectionCriteria>, bool)> GetLabeledSelectionCriteria(
RestoreTargetGraph
graph, NuGetFramework framework)
109
internal (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)
24
private IEnumerable<
RestoreTargetGraph
> _restoreTargetGraphs;
82
public void ApplyRestoreOutput(IEnumerable<
RestoreTargetGraph
> restoreTargetGraphs)
RestoreCommand\Logging\TransitiveNoWarnUtils.cs (3)
28
IEnumerable<
RestoreTargetGraph
> targetGraphs,
44
foreach (
var
targetGraph in targetGraphs)
85
RestoreTargetGraph
targetGraph,
RestoreCommand\OriginalCaseGlobalPackageFolder.cs (2)
62
public async Task CopyPackagesToOriginalCaseAsync(IEnumerable<
RestoreTargetGraph
> graphs, CancellationToken token)
71
foreach (
var
graph in graphs)
RestoreCommand\ProjectRestoreCommand.cs (17)
45
public async Task<Tuple<bool, List<
RestoreTargetGraph
>, RuntimeGraph>> TryRestoreAsync(LibraryRange projectRange,
58
var frameworkTasks = new List<Task<
RestoreTargetGraph
>>();
59
var graphs = new List<
RestoreTargetGraph
>();
111
var runtimeGraphs = new List<
RestoreTargetGraph
>();
112
var runtimeTasks = new List<Task<
RestoreTargetGraph
[]>>();
114
foreach (
var
graph in graphs)
146
foreach (
var
runtimeSpecificGraph in (await Task.WhenAll(runtimeTasks)).SelectMany(g => g))
256
private Task<
RestoreTargetGraph
> WalkDependenciesAsync(LibraryRange projectRange,
273
private async Task<
RestoreTargetGraph
> WalkDependenciesAsync(LibraryRange projectRange,
299
return
RestoreTargetGraph
.Create(runtimeGraph, graphs, context, targetAlias, framework, runtimeIdentifier);
302
internal async Task<bool> ResolutionSucceeded(IEnumerable<
RestoreTargetGraph
> graphs, IList<DownloadDependencyResolutionResult> downloadDependencyResults, RemoteWalkContext context, CancellationToken token)
305
foreach (
var
graph in graphs)
348
IEnumerable<
RestoreTargetGraph
> graphs,
457
private Task<
RestoreTargetGraph
[]> WalkRuntimeDependenciesAsync(LibraryRange projectRange,
458
RestoreTargetGraph
graph,
465
var resultGraphs = new List<Task<
RestoreTargetGraph
>>();
486
internal static RuntimeGraph GetRuntimeGraph(
RestoreTargetGraph
graph, IReadOnlyList<NuGetv3LocalRepository> localRepositories, RuntimeGraph projectRuntimeGraph, RestoreCollectorLogger logger)
RestoreCommand\RestoreCommand.cs (33)
42
private 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);
586
private async Task<(bool, List<
RestoreTargetGraph
>)> GenerateRestoreGraphsAsync(TelemetryActivity telemetry, RemoteWalkContext contextForProject, bool success, CancellationToken token)
588
List<
RestoreTargetGraph
> graphs = null;
625
var
restoreTargetGraph =
RestoreTargetGraph
.Create(_request.Project.RuntimeGraph, Enumerable.Empty<GraphNode<RemoteResolveResult>>(), contextForProject, frameworkRuntimePairs[i].TargetAlias, frameworkRuntimePairs[i].Framework, frameworkRuntimePairs[i].RuntimeIdentifier);
633
private async Task<(bool, IEnumerable<MSBuildOutputFile>, string, string, LockFile, List<
RestoreTargetGraph
>, PackagesLockFile, string, CacheFile)> ProcessRestoreResultAsync(TelemetryActivity telemetry,
639
List<
RestoreTargetGraph
> graphs,
789
private async Task<bool> PerformAuditAsync(List<
RestoreTargetGraph
> graphs, TelemetryActivity telemetry, CancellationToken token)
1555
IEnumerable<
RestoreTargetGraph
> graphs,
1577
List<
RestoreTargetGraph
> graphs,
1613
private async Task<bool> ValidateRestoreGraphsAsync(IEnumerable<
RestoreTargetGraph
> graphs, ILogger logger)
1636
private static async Task<bool> ValidateCyclesAsync(IEnumerable<
RestoreTargetGraph
> graphs, ILogger logger)
1638
foreach (
var
graph in graphs)
1654
private async Task<bool> ValidateConflictsAsync(IEnumerable<
RestoreTargetGraph
> graphs, ILogger logger)
1656
foreach (
var
graph in graphs)
1698
internal static Task LogDowngradeWarningsOrErrorsAsync(IEnumerable<
RestoreTargetGraph
> graphs, ILogger logger)
1702
foreach (
var
graph in graphs)
1757
Dictionary<
RestoreTargetGraph
, Dictionary<string, LibraryIncludeFlags>> includeFlagGraphs,
1760
IEnumerable<
RestoreTargetGraph
> graphs,
1769
foreach (
var
graph in graphs)
1803
private async Task<(bool, List<
RestoreTargetGraph
>)> ExecuteLegacyRestoreAsync(
1849
var allGraphs = new List<
RestoreTargetGraph
>();
1861
Tuple<bool, List<
RestoreTargetGraph
>, RuntimeGraph> result = null;
1910
allGraphs.Add(
RestoreTargetGraph
.Create(_request.Project.RuntimeGraph, Enumerable.Empty<GraphNode<RemoteResolveResult>>(), context, frameworkRuntimePair.TargetAlias, frameworkRuntimePair.Framework, frameworkRuntimePair.RuntimeIdentifier));
1944
Tuple<bool, List<
RestoreTargetGraph
>, RuntimeGraph> compatibilityResult = null;
1971
foreach (
var
graph in compatibilityResult.Item2)
1988
private async Task<(bool, List<
RestoreTargetGraph
>)> ExecuteRestoreAsync(
2041
List<
RestoreTargetGraph
> graphs = null;
2049
(bool Success, List<
RestoreTargetGraph
> Graphs, RuntimeGraph Runtimes) result = await dependencyGraphResolver.ResolveAsync(userPackageFolder, fallbackPackageFolders, context, projectRestoreCommand, localRepositories, token);
2070
graphs = new List<
RestoreTargetGraph
>();
2076
graphs.Add(
RestoreTargetGraph
.Create(_request.Project.RuntimeGraph, Enumerable.Empty<GraphNode<RemoteResolveResult>>(), context, frameworkRuntimePair.TargetAlias, frameworkRuntimePair.Framework, frameworkRuntimePair.RuntimeIdentifier));
RestoreCommand\RestoreResult.cs (2)
31
public IEnumerable<
RestoreTargetGraph
> RestoreGraphs { get; }
110
IEnumerable<
RestoreTargetGraph
> restoreGraphs,
RestoreCommand\RestoreTargetGraph.cs (1)
112
internal static
RestoreTargetGraph
Create(
RestoreCommand\Utility\AuditUtility.cs (4)
26
private readonly List<
RestoreTargetGraph
> _targetGraphs;
65
List<
RestoreTargetGraph
> graphs,
220
foreach (
RestoreTargetGraph
graph in _targetGraphs)
378
foreach (
RestoreTargetGraph
graph in _targetGraphs)
RestoreCommand\Utility\BuildAssetsUtils.cs (3)
435
IEnumerable<
RestoreTargetGraph
> targetGraphs,
499
RestoreTargetGraph
targetGraph = null;
500
foreach (
RestoreTargetGraph
graph in targetGraphs)
RestoreCommand\Utility\IncludeFlagUtils.cs (4)
19
Dictionary<
RestoreTargetGraph
, Dictionary<string, LibraryIncludeFlags>> includeFlagGraphs,
21
RestoreTargetGraph
graph)
34
RestoreTargetGraph
targetGraph,
78
RestoreTargetGraph
targetGraph,
RestoreCommand\Utility\LockFileUtils.cs (3)
34
RestoreTargetGraph
targetGraph,
65
RestoreTargetGraph
targetGraph,
492
RestoreTargetGraph
targetGraph,