Table of Contents

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

RuntimeGraph

RuntimeGraphFileName

public static readonly string RuntimeGraphFileName

Field Value

string

Properties

Runtimes

public IReadOnlyDictionary<string, RuntimeDescription> Runtimes { get; }

Property Value

IReadOnlyDictionary<string, RuntimeDescription>

Supports

public IReadOnlyDictionary<string, CompatibilityProfile> Supports { get; set; }

Property Value

IReadOnlyDictionary<string, CompatibilityProfile>

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 string

The criteria being tested

provided string

The value the criteria is being tested against

Returns

bool

true if an asset for the runtime in provided can be installed in a project targetting criteria, false otherwise

Clone()

public RuntimeGraph Clone()

Returns

RuntimeGraph

Equals(RuntimeGraph)

public bool Equals(RuntimeGraph other)

Parameters

other RuntimeGraph

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

ExpandRuntime(string)

Find all compatible RIDs including the current RID.

public IEnumerable<string> ExpandRuntime(string runtime)

Parameters

runtime string

Returns

IEnumerable<string>

FindRuntimeDependencies(string, string)

public IEnumerable<RuntimePackageDependency> FindRuntimeDependencies(string runtimeName, string packageId)

Parameters

runtimeName string
packageId string

Returns

IEnumerable<RuntimePackageDependency>

GetHashCode()

public override int GetHashCode()

Returns

int

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 RuntimeGraph
right RuntimeGraph

Returns

RuntimeGraph