7 instantiations of GraphItem
NuGet.Commands (4)
RestoreCommand\DependencyGraphResolver.cs (3)
606
Item = new
GraphItem
<RemoteResolveResult>(
684
Item = new
GraphItem
<RemoteResolveResult>(
693
Item = new
GraphItem
<RemoteResolveResult>(toResolvedDependencyGraphItem.Item.Key)
RestoreCommand\DependencyGraphResolver.DependencyGraphItem.cs (1)
132
return new
GraphItem
<RemoteResolveResult>(item.Key)
NuGet.DependencyResolver.Core (3)
Remote\RemoteDependencyWalker.cs (1)
320
node.Item = new
GraphItem
<RemoteResolveResult>(node.Item.Key)
ResolverUtility.cs (2)
146
return new
GraphItem
<RemoteResolveResult>(match.Library)
558
return new
GraphItem
<RemoteResolveResult>(match.Library)
101 references to GraphItem
NuGet.CommandLine.XPlat (1)
Commands\PackageReferenceCommands\AddPackageReferenceCommandRunner.cs (1)
483
var
firstMatchingEntry = matchingPackageEntries
NuGet.Commands (46)
RestoreCommand\CompatibilityChecker.cs (2)
70
foreach (
var
node in graph.Flattened)
341
private async Task VerifyDotnetToolCompatibilityChecks(CompatibilityData compatibilityData,
GraphItem
<RemoteResolveResult> node, RestoreTargetGraph graph, List<CompatibilityIssue> issues)
RestoreCommand\DependencyGraphResolver.cs (2)
328
HashSet<
GraphItem
<RemoteResolveResult>> flattenedGraphItems = new();
978
GraphItem
<RemoteResolveResult> currentGraphItem = await currentDependencyGraphItem.GetGraphItemAsync(_request.Project.RestoreMetadata, projectTargetFramework.PackagesToPrune, IsNewerThanNET10(projectTargetFramework.FrameworkName), isRootProject, targetGraphName, _logger);
RestoreCommand\DependencyGraphResolver.DependencyGraphItem.cs (6)
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;
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 (7)
18
private readonly Dictionary<string,
GraphItem
<RemoteResolveResult>> _lookup
19
= new Dictionary<string,
GraphItem
<RemoteResolveResult>>(StringComparer.OrdinalIgnoreCase);
33
foreach (
var
node in graph.Flattened)
72
public
GraphItem
<RemoteResolveResult> GetItemById(string id)
74
if (_lookup.TryGetValue(id, out
var
node))
85
public
GraphItem
<RemoteResolveResult> GetItemById(string id, LibraryType libraryType)
87
if (_lookup.TryGetValue(id, out
var
node)
RestoreCommand\Diagnostics\UnexpectedDependencyMessages.cs (3)
158
var
match = indexedGraph.GetItemById(dependency.Name, LibraryType.Package);
256
foreach (
var
node in graph.Flattened)
274
var
match = indexedGraph.GetItemById(dependencyId, LibraryType.Package);
RestoreCommand\IRestoreTargetGraph.cs (1)
56
ISet<
GraphItem
<RemoteResolveResult>> Flattened { get; }
RestoreCommand\LockFileBuilder.cs (3)
63
foreach (
var
item in libraryItems)
193
foreach (
var
graphItem in targetGraph.Flattened.OrderBy(x => x.Key))
446
var
resolvedEntry = targetGraph?
RestoreCommand\Logging\TransitiveNoWarnUtils.cs (1)
105
foreach (
var
dependencyGraphItem in targetGraph.Flattened)
RestoreCommand\ProjectRestoreCommand.cs (1)
493
foreach (
var
node in graph.Flattened)
RestoreCommand\RestoreTargetGraph.cs (3)
51
public ISet<
GraphItem
<RemoteResolveResult>> Flattened { get; }
73
ISet<
GraphItem
<RemoteResolveResult>> flattened,
121
var flattened = new HashSet<
GraphItem
<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 (2)
857
ISet<
GraphItem
<RemoteResolveResult>> items)
861
foreach (
var
item in items)
RestoreCommand\Utility\IncludeFlagUtils.cs (8)
84
var unifiedNodes = new Dictionary<string,
GraphItem
<RemoteResolveResult>>(StringComparer.OrdinalIgnoreCase);
90
foreach (
var
item in targetGraph.Flattened
106
GraphItem
<RemoteResolveResult> unifiedRoot;
163
GraphItem
<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)
489
GraphItem
<RemoteResolveResult> graphItem,
NuGet.DependencyResolver.Core (54)
GraphItemKeyComparer.cs (5)
12
/// A <see cref="
GraphItem
{T}"/> Key based comparer. Two instances are equal only if the Keys are equal.
14
public sealed class GraphItemKeyComparer<T> : IEqualityComparer<
GraphItem
<T>>
36
public bool Equals(
GraphItem
<T> x,
GraphItem
<T> y)
45
public int GetHashCode(
GraphItem
<T> obj)
GraphModel\GraphEdge.cs (2)
18
public GraphEdge(GraphEdge<TItem> outerEdge,
GraphItem
<TItem> item, LibraryDependency edge)
33
public
GraphItem
<TItem> Item { get; }
GraphModel\GraphItem.cs (4)
14
public class GraphItem<TItem> : IEquatable<
GraphItem
<TItem>>
31
return Equals(obj as
GraphItem
<TItem>);
34
public bool Equals(
GraphItem
<TItem> other)
50
private bool KeyCompare(
GraphItem
<TItem> other)
GraphModel\GraphNode.cs (1)
31
public
GraphItem
<TItem> Item { get; set; }
GraphModel\Tracker.cs (26)
15
public void Track(
GraphItem
<TItem> item)
20
public bool IsDisputed(
GraphItem
<TItem> item)
25
public bool IsAmbiguous(
GraphItem
<TItem> item)
30
public void MarkAmbiguous(
GraphItem
<TItem> item)
38
public bool IsBestVersion(
GraphItem
<TItem> item)
46
foreach (
var
known in entry)
58
public IEnumerable<
GraphItem
<TItem>> GetDisputes(
GraphItem
<TItem> item)
63
return Enumerable.Empty<
GraphItem
<TItem>>();
74
private Entry? TryGetEntry(
GraphItem
<TItem> item)
80
private Entry GetOrAddEntry(
GraphItem
<TItem> item)
91
private sealed class Entry : IEnumerable<
GraphItem
<TItem>>
108
public void AddItem(
GraphItem
<TItem> item)
114
else if (_storage is
GraphItem
<TItem> existingItem)
121
_storage = new HashSet<
GraphItem
<TItem>>(capacity: 3) { existingItem, item };
127
((HashSet<
GraphItem
<TItem>>)_storage).Add(item);
136
IEnumerator<
GraphItem
<TItem>> IEnumerable<
GraphItem
<TItem>>.GetEnumerator()
146
public bool HasMultipleItems => _storage is HashSet<
GraphItem
<TItem>>;
148
public struct Enumerator : IEnumerator<
GraphItem
<TItem>>, IDisposable, IEnumerator
159
private
GraphItem
<TItem> _current;
161
private HashSet<
GraphItem
<TItem>>.Enumerator _setEnumerator;
173
else if (_entry._storage is
GraphItem
<TItem>)
180
_setEnumerator = ((HashSet<
GraphItem
<TItem>>)_entry._storage).GetEnumerator();
184
public readonly
GraphItem
<TItem> Current => _current;
197
_current = (
GraphItem
<TItem>)_entry._storage!;
Remote\RemoteDependencyWalker.cs (7)
92
var
rootItem = await ResolverUtility.FindLibraryCachedAsync(
219
var
dependencyItem = await graphNodeCreationData.GraphItemTask;
367
var
item = node.Item;
381
GraphItem
<RemoteResolveResult> item, LibraryDependency parentDependency, LibraryRange childDependencyLibrary, bool isRoot)
721
/// A <see cref="Task{TResult}"/> that represents the retrieval of the necessary <see cref="
GraphItem
{TItem}"/> to complete construction of the <see cref="GraphNode{TItem}"/>.
723
public readonly Task<
GraphItem
<RemoteResolveResult>> GraphItemTask;
740
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 (5)
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(
554
private static
GraphItem
<RemoteResolveResult> CreateUnresolvedResult(LibraryRange libraryRange)