4 instantiations of RemoteResolveResult
NuGet.Commands (1)
RestoreCommand\DependencyGraphResolver.DependencyGraphItem.cs (1)
134
Data = new
RemoteResolveResult
()
NuGet.DependencyResolver.Core (3)
Remote\RemoteDependencyWalker.cs (1)
325
Data = new
RemoteResolveResult
()
ResolverUtility.cs (2)
148
Data = new
RemoteResolveResult
560
Data = new
RemoteResolveResult
()
158 references to RemoteResolveResult
NuGet.Commands (83)
RestoreCommand\CompatibilityChecker.cs (1)
341
private async Task VerifyDotnetToolCompatibilityChecks(CompatibilityData compatibilityData, GraphItem<
RemoteResolveResult
> node, RestoreTargetGraph graph, List<CompatibilityIssue> issues)
RestoreCommand\DependencyGraphResolver.cs (29)
325
AnalyzeResult<
RemoteResolveResult
> analyzeResult = new();
328
HashSet<GraphItem<
RemoteResolveResult
>> flattenedGraphItems = new();
331
List<GraphNode<
RemoteResolveResult
>> graphNodes = new();
334
Dictionary<LibraryRangeIndex, GraphNode<
RemoteResolveResult
>> nodesById = new();
340
Queue<(LibraryDependencyIndex, LibraryRangeIndex, GraphNode<
RemoteResolveResult
>)> itemsToFlatten = new();
342
Dictionary<LibraryRangeIndex, GraphNode<
RemoteResolveResult
>> versionConflicts = new();
351
GraphNode<
RemoteResolveResult
> rootGraphNode = new GraphNode<
RemoteResolveResult
>(projectResolvedDependencyGraphItem.LibraryDependency.LibraryRange)
365
(LibraryDependencyIndex currentLibraryDependencyIndex, LibraryRangeIndex currentLibraryRangeIndex, GraphNode<
RemoteResolveResult
> currentGraphNode) = itemsToFlatten.Dequeue();
387
GraphNode<
RemoteResolveResult
> nodeWithCycle = new(childLibraryDependency.LibraryRange)
418
new GraphNode<
RemoteResolveResult
>(childLibraryDependency.LibraryRange)
521
GraphNode<
RemoteResolveResult
> nodeWithConflict = new(childResolvedLibraryDependency.LibraryRange)
540
GraphNode<
RemoteResolveResult
> newGraphNode = new(childResolvedLibraryDependency.LibraryRange)
545
GraphNode<
RemoteResolveResult
> parentGraphNode;
609
GraphNode<
RemoteResolveResult
> conflictingNode = new(childLibraryDependency.LibraryRange)
612
Item = new GraphItem<
RemoteResolveResult
>(
657
foreach (KeyValuePair<LibraryRangeIndex, GraphNode<
RemoteResolveResult
>> versionConflict in versionConflicts)
659
if (nodesById.TryGetValue(versionConflict.Key, out GraphNode<
RemoteResolveResult
>? selected))
662
new VersionConflictResult<
RemoteResolveResult
>
678
if (!nodesById.TryGetValue(downgrade.FromParentLibraryRangeIndex, out GraphNode<
RemoteResolveResult
>? fromParentNode)
679
|| !nodesById.TryGetValue(downgrade.ToParentLibraryRangeIndex, out GraphNode<
RemoteResolveResult
>? toParentNode)
686
analyzeResult.Downgrades.Add(new DowngradeResult<
RemoteResolveResult
>
688
DowngradedFrom = new GraphNode<
RemoteResolveResult
>(downgrade.FromLibraryDependency.LibraryRange)
690
Item = new GraphItem<
RemoteResolveResult
>(
697
DowngradedTo = new GraphNode<
RemoteResolveResult
>(toResolvedDependencyGraphItem.LibraryDependency.LibraryRange)
699
Item = new GraphItem<
RemoteResolveResult
>(toResolvedDependencyGraphItem.Item.Key)
725
|| !nodesById.TryGetValue(resolvedDependencyGraphItem.LibraryRangeIndex, out GraphNode<
RemoteResolveResult
>? currentNode))
733
if (!nodesById.TryGetValue(parentLibraryRangeIndex, out GraphNode<
RemoteResolveResult
>? parentNode))
988
GraphItem<
RemoteResolveResult
> currentGraphItem = await currentDependencyGraphItem.GetGraphItemAsync(_request.Project.RestoreMetadata, projectTargetFramework.PackagesToPrune, IsNewerThanNET10(projectTargetFramework.FrameworkName), isRootProject, targetGraphName, _logger);
RestoreCommand\DependencyGraphResolver.DependencyGraphItem.cs (7)
25
/// Gets or initializes a <see cref="Task{TResult}" /> that returns a <see cref="GraphItem{TItem}" /> containing a <see cref="
RemoteResolveResult
" /> that represents the resolved graph item after looking it up in the configured feeds.
27
public required Task<GraphItem<
RemoteResolveResult
>> FindLibraryTask { get; init; }
75
/// Gets the <see cref="GraphItem{TItem}" /> with the <see cref="
RemoteResolveResult
" /> of this dependency graph item from calling the delegate specified in <see cref="FindLibraryTask" />.
81
/// <returns>A <see cref="GraphItem{TItem}" /> with the <see cref="
RemoteResolveResult
" /> of the result of finding the library.</returns>
82
public async Task<GraphItem<
RemoteResolveResult
>> GetGraphItemAsync(
91
GraphItem<
RemoteResolveResult
> item = await FindLibraryTask;
132
return new GraphItem<
RemoteResolveResult
>(item.Key)
RestoreCommand\DependencyGraphResolver.ResolvedDependencyGraphItem.cs (4)
33
/// <param name="item">The <see cref="GraphItem{TItem}" /> with a <see cref="
RemoteResolveResult
" /> of the resolved library.</param>
38
GraphItem<
RemoteResolveResult
> item,
93
/// Gets the <see cref="GraphItem{TItem}" /> with a <see cref="
RemoteResolveResult
" /> of the resolved library.
95
public GraphItem<
RemoteResolveResult
> Item { get; }
RestoreCommand\Diagnostics\IndexedRestoreTargetGraph.cs (4)
18
private readonly Dictionary<string, GraphItem<
RemoteResolveResult
>> _lookup
19
= new Dictionary<string, GraphItem<
RemoteResolveResult
>>(StringComparer.OrdinalIgnoreCase);
72
public GraphItem<
RemoteResolveResult
> GetItemById(string id)
85
public GraphItem<
RemoteResolveResult
> GetItemById(string id, LibraryType libraryType)
RestoreCommand\IRestoreTargetGraph.cs (3)
52
IEnumerable<GraphNode<
RemoteResolveResult
>> Graphs { get; }
56
ISet<GraphItem<
RemoteResolveResult
>> Flattened { get; }
64
AnalyzeResult<
RemoteResolveResult
> AnalyzeResult { get; }
RestoreCommand\LockFileBuilder.cs (8)
61
.Distinct(GraphItemKeyComparer<
RemoteResolveResult
>.Instance) // Distinct list of GraphItems. Two items are equal only if the itmes' Keys are equal.
533
HashSet<GraphNode<
RemoteResolveResult
>> visitedNodes = new HashSet<GraphNode<
RemoteResolveResult
>>();
534
Queue<GraphNode<
RemoteResolveResult
>> queue = new Queue<GraphNode<
RemoteResolveResult
>>();
536
foreach (GraphNode<
RemoteResolveResult
> rootNode in targetGraph.Graphs)
540
foreach (GraphNode<
RemoteResolveResult
> node in rootNode.InnerNodes)
563
foreach (GraphNode<
RemoteResolveResult
> dependencyNode in EnumerateNodesForDependencyChecks(visitedNodes, queue, rootNode, node))
RestoreCommand\ProjectRestoreCommand.cs (1)
285
var graphs = new List<GraphNode<
RemoteResolveResult
>>
RestoreCommand\RestoreCommand.cs (4)
517
foreach (GraphItem<
RemoteResolveResult
> graphItem in graph.Flattened)
788
var restoreTargetGraph = RestoreTargetGraph.Create(_request.Project.RuntimeGraph, Enumerable.Empty<GraphNode<
RemoteResolveResult
>>(), contextForProject, frameworkRuntimePairs[i].TargetAlias, frameworkRuntimePairs[i].Framework, frameworkRuntimePairs[i].RuntimeIdentifier);
2124
allGraphs.Add(RestoreTargetGraph.Create(_request.Project.RuntimeGraph, Enumerable.Empty<GraphNode<
RemoteResolveResult
>>(), context, frameworkRuntimePair.TargetAlias, frameworkRuntimePair.Framework, frameworkRuntimePair.RuntimeIdentifier));
2290
graphs.Add(RestoreTargetGraph.Create(_request.Project.RuntimeGraph, Enumerable.Empty<GraphNode<
RemoteResolveResult
>>(), context, frameworkRuntimePair.TargetAlias, frameworkRuntimePair.Framework, frameworkRuntimePair.RuntimeIdentifier));
RestoreCommand\RestoreTargetGraph.cs (9)
47
public IEnumerable<GraphNode<
RemoteResolveResult
>> Graphs { get; }
51
public ISet<GraphItem<
RemoteResolveResult
>> Flattened { get; }
62
public AnalyzeResult<
RemoteResolveResult
> AnalyzeResult { get; }
71
IEnumerable<GraphNode<
RemoteResolveResult
>> graphs,
73
ISet<GraphItem<
RemoteResolveResult
>> flattened,
75
AnalyzeResult<
RemoteResolveResult
> analyzeResult,
114
IEnumerable<GraphNode<
RemoteResolveResult
>> graphs,
121
var flattened = new HashSet<GraphItem<
RemoteResolveResult
>>();
125
var analyzeResult = new AnalyzeResult<
RemoteResolveResult
>();
RestoreCommand\Utility\AuditUtility.cs (2)
380
GraphItem<
RemoteResolveResult
>? currentProject = graph.Graphs.FirstOrDefault()?.Item;
382
foreach (GraphItem<
RemoteResolveResult
>? node in graph.Flattened.Where(r => r.Key.Type == LibraryType.Package))
RestoreCommand\Utility\BuildAssetsUtils.cs (1)
877
ISet<GraphItem<
RemoteResolveResult
>> items)
RestoreCommand\Utility\IncludeFlagUtils.cs (9)
84
var unifiedNodes = new Dictionary<string, GraphItem<
RemoteResolveResult
>>(StringComparer.OrdinalIgnoreCase);
106
GraphItem<
RemoteResolveResult
> unifiedRoot;
163
GraphItem<
RemoteResolveResult
> child;
185
GraphNode<
RemoteResolveResult
> parent,
186
GraphNode<
RemoteResolveResult
> child)
206
private static bool IsPackageOrProject(GraphItem<
RemoteResolveResult
> item)
218
private static int OrderType(GraphItem<
RemoteResolveResult
> item)
241
public DependencyNode(GraphItem<
RemoteResolveResult
> item, LibraryIncludeFlags dependencyType)
255
public GraphItem<
RemoteResolveResult
> Item { get; }
RestoreCommand\Utility\LockFileUtils.cs (1)
519
GraphItem<
RemoteResolveResult
> graphItem,
NuGet.DependencyResolver.Core (75)
GraphModel\GraphOperations.cs (25)
30
public static AnalyzeResult<
RemoteResolveResult
> Analyze(this GraphNode<
RemoteResolveResult
> root)
32
var result = new AnalyzeResult<
RemoteResolveResult
>();
49
private static bool IsRelevantDowngrade(DowngradeResult<
RemoteResolveResult
> d)
53
static bool AreAllParentsAccepted(DowngradeResult<
RemoteResolveResult
> d)
55
GraphNode<
RemoteResolveResult
>? resultToCheck = d.DowngradedFrom.OuterNode;
71
this GraphNode<
RemoteResolveResult
> root,
72
List<DowngradeResult<
RemoteResolveResult
>> downgrades,
73
List<GraphNode<
RemoteResolveResult
>> cycles)
87
downgrades.Add(new DowngradeResult<
RemoteResolveResult
>
97
private static void WalkTreeCheckCycleAndNearestWins(CyclesAndDowngrades context, GraphNode<
RemoteResolveResult
> node)
670
private static Dictionary<GraphNode<
RemoteResolveResult
>, GraphNode<
RemoteResolveResult
>>? _tempDowngrades;
672
public static Dictionary<GraphNode<
RemoteResolveResult
>, GraphNode<
RemoteResolveResult
>> RentDowngradesDictionary()
681
return new Dictionary<GraphNode<
RemoteResolveResult
>, GraphNode<
RemoteResolveResult
>>();
684
public static void ReleaseDowngradesDictionary(Dictionary<GraphNode<
RemoteResolveResult
>, GraphNode<
RemoteResolveResult
>> dictionary)
844
public List<GraphNode<
RemoteResolveResult
>> Cycles;
845
public Dictionary<GraphNode<
RemoteResolveResult
>, GraphNode<
RemoteResolveResult
>> Downgrades;
848
private static CyclesAndDowngrades CreateState(List<GraphNode<
RemoteResolveResult
>> cycles, Dictionary<GraphNode<
RemoteResolveResult
>, GraphNode<
RemoteResolveResult
>> downgrades)
Remote\RemoteDependencyWalker.cs (38)
29
public async Task<GraphNode<
RemoteResolveResult
>> WalkAsync(LibraryRange library, NuGetFramework framework, string? runtimeIdentifier, RuntimeGraph? runtimeGraph, bool recursive)
51
var transitiveCentralPackageVersionNodes = new List<GraphNode<
RemoteResolveResult
>>();
69
private async ValueTask<GraphNode<
RemoteResolveResult
>> CreateGraphNodeAsync(
75
GraphEdge<
RemoteResolveResult
>? outerEdge,
101
GraphNode<
RemoteResolveResult
> rootNode = new GraphNode<
RemoteResolveResult
>(libraryRange, rootHasInnerNodes, hasParentNodes)
121
GraphNode<
RemoteResolveResult
> node = currentState.GraphNode;
124
GraphEdge<
RemoteResolveResult
>? currentOuterEdge = currentState.OuterEdge;
134
GraphItem<
RemoteResolveResult
> nodeItem = node.Item ?? throw new InvalidOperationException();
160
var innerEdge = new GraphEdge<
RemoteResolveResult
>(currentOuterEdge, nodeItem, dependency);
198
var dependencyNode = new GraphNode<
RemoteResolveResult
>(dependency.LibraryRange)
223
GraphNode<
RemoteResolveResult
> newNode = new GraphNode<
RemoteResolveResult
>(graphNodeCreationData.LibraryRange, hasInnerNodes, false)
242
GraphItem<
RemoteResolveResult
> newNodeItem = newNode.Item ?? throw new InvalidOperationException();
300
public static void MergeRuntimeDependencies(HashSet<LibraryDependency>? runtimeDependencies, GraphNode<
RemoteResolveResult
> node)
305
GraphItem<
RemoteResolveResult
> nodeItem = node.Item ?? throw new InvalidOperationException();
323
node.Item = new GraphItem<
RemoteResolveResult
>(node.Item.Key)
345
GraphEdge<
RemoteResolveResult
>? graphEdge,
367
GraphItem<
RemoteResolveResult
> item,
383
GraphItem<
RemoteResolveResult
> item, LibraryDependency parentDependency, LibraryRange childDependencyLibrary, bool isRoot)
577
GraphNode<
RemoteResolveResult
> parentNode)
586
private async Task<GraphNode<
RemoteResolveResult
>> AddTransitiveCentralPackageVersionNodesAsync(
587
GraphNode<
RemoteResolveResult
> rootNode,
596
GraphNode<
RemoteResolveResult
> node = await CreateGraphNodeAsync(
631
private Dictionary<string, List<GraphNode<
RemoteResolveResult
>>> _transitiveCentralPackageVersions;
636
_transitiveCentralPackageVersions = new Dictionary<string, List<GraphNode<
RemoteResolveResult
>>>(StringComparer.OrdinalIgnoreCase);
639
internal void Add(LibraryDependency centralPackageVersionDependency, GraphNode<
RemoteResolveResult
> parentNode)
645
list = new List<GraphNode<
RemoteResolveResult
>>();
660
internal void AddParentsToNode(GraphNode<
RemoteResolveResult
> node)
664
List<GraphNode<
RemoteResolveResult
>> graphNodes = _transitiveCentralPackageVersions[(node.Item ?? throw new InvalidOperationException()).Key.Name];
695
public readonly GraphNode<
RemoteResolveResult
> GraphNode;
710
public readonly GraphEdge<
RemoteResolveResult
>? OuterEdge;
713
GraphNode<
RemoteResolveResult
> graphNode,
716
GraphEdge<
RemoteResolveResult
>? outerEdge)
733
public readonly Task<GraphItem<
RemoteResolveResult
>> GraphItemTask;
748
public readonly GraphEdge<
RemoteResolveResult
> OuterEdge;
750
public GraphNodeCreationData(Task<GraphItem<
RemoteResolveResult
>> graphItemTask, HashSet<LibraryDependency>? runtimeDependencies, LibraryRange libraryRange, GraphEdge<
RemoteResolveResult
> outerEdge)
Remote\RemoteWalkContext.cs (4)
26
FindLibraryEntryCache = new TaskResultCache<LibraryRangeCacheKey, GraphItem<
RemoteResolveResult
>>();
47
internal TaskResultCache<LibraryRangeCacheKey, GraphItem<
RemoteResolveResult
>> FindLibraryEntryCache { get; }
108
if (!FindLibraryEntryCache.TryGetValue(key, out Task<GraphItem<
RemoteResolveResult
>>? task))
113
GraphItem<
RemoteResolveResult
> item = await task;
ResolverUtility.cs (8)
20
public static Task<GraphItem<
RemoteResolveResult
>> FindLibraryCachedAsync(
36
public static async Task<GraphItem<
RemoteResolveResult
>> FindLibraryEntryAsync(
48
GraphItem<
RemoteResolveResult
>? graphItem = null;
111
private static async Task<GraphItem<
RemoteResolveResult
>> CreateGraphItemAsync(
146
return new GraphItem<
RemoteResolveResult
>(match.Library)
554
private static GraphItem<
RemoteResolveResult
> CreateUnresolvedResult(LibraryRange libraryRange)
558
return new GraphItem<
RemoteResolveResult
>(match.Library)
563
Dependencies =
RemoteResolveResult
.EmptyDependencies