Class RuntimeGraph
- Namespace
- NuGet.RuntimeModel
- Assembly
- Chocolatey.NuGet.Packaging.dll
public class RuntimeGraph : IEquatable<RuntimeGraph>
- Inheritance
-
RuntimeGraph
- Implements
- Inherited Members
Constructors
RuntimeGraph()
public RuntimeGraph()
RuntimeGraph(IEnumerable<CompatibilityProfile>)
public RuntimeGraph(IEnumerable<CompatibilityProfile> supports)
Parameters
supports
IEnumerable<CompatibilityProfile>
RuntimeGraph(IEnumerable<RuntimeDescription>)
public RuntimeGraph(IEnumerable<RuntimeDescription> runtimes)
Parameters
runtimes
IEnumerable<RuntimeDescription>
RuntimeGraph(IEnumerable<RuntimeDescription>, IEnumerable<CompatibilityProfile>)
public RuntimeGraph(IEnumerable<RuntimeDescription> runtimes, IEnumerable<CompatibilityProfile> supports)
Parameters
runtimes
IEnumerable<RuntimeDescription>supports
IEnumerable<CompatibilityProfile>
Fields
Empty
public static readonly RuntimeGraph Empty
Field Value
RuntimeGraphFileName
public static readonly string RuntimeGraphFileName
Field Value
Properties
Runtimes
public IReadOnlyDictionary<string, RuntimeDescription> Runtimes { get; }
Property Value
Supports
public IReadOnlyDictionary<string, CompatibilityProfile> Supports { get; set; }
Property Value
Methods
AreCompatible(string, string)
Determines if two runtime identifiers are compatible, based on the import graph
public bool AreCompatible(string criteria, string provided)
Parameters
criteria
stringThe criteria being tested
provided
stringThe value the criteria is being tested against
Returns
- bool
true if an asset for the runtime in
provided
can be installed in a project targettingcriteria
, false otherwise
Clone()
public RuntimeGraph Clone()
Returns
Equals(RuntimeGraph)
public bool Equals(RuntimeGraph other)
Parameters
other
RuntimeGraph
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
ExpandRuntime(string)
Find all compatible RIDs including the current RID.
public IEnumerable<string> ExpandRuntime(string runtime)
Parameters
runtime
string
Returns
FindRuntimeDependencies(string, string)
public IEnumerable<RuntimePackageDependency> FindRuntimeDependencies(string runtimeName, string packageId)
Parameters
Returns
GetHashCode()
public override int GetHashCode()
Returns
Merge(RuntimeGraph, RuntimeGraph)
Merges the content of the other runtime graph in to this runtime graph
public static RuntimeGraph Merge(RuntimeGraph left, RuntimeGraph right)
Parameters
left
RuntimeGraphright
RuntimeGraph