Table of Contents

Class PackagesConfig

Namespace
NuGet.Packaging
Assembly
Chocolatey.NuGet.Packaging.dll
public static class PackagesConfig
Inheritance
PackagesConfig
Inherited Members

Fields

IdAttributeName

public static readonly string IdAttributeName

Field Value

string

MinClientAttributeName

public static readonly string MinClientAttributeName

Field Value

string

PackageNodeName

public static readonly string PackageNodeName

Field Value

string

PackagesNodeName

public static readonly string PackagesNodeName

Field Value

string

RequireInstallAttributeName

public static readonly string RequireInstallAttributeName

Field Value

string

TargetFrameworkAttributeName

public static readonly string TargetFrameworkAttributeName

Field Value

string

UserInstalledAttributeName

public static readonly string UserInstalledAttributeName

Field Value

string

VersionAttributeName

public static readonly string VersionAttributeName

Field Value

string

allowedVersionsAttributeName

public static readonly string allowedVersionsAttributeName

Field Value

string

developmentDependencyAttributeName

public static readonly string developmentDependencyAttributeName

Field Value

string

Methods

BoolAttribute(XElement, string, bool)

Get a boolean attribute value, or false if it does not exist

public static bool BoolAttribute(XElement node, string name, bool defaultValue = false)

Parameters

node XElement
name string
defaultValue bool

Returns

bool

HasAttributeValue(XElement, string, string, out XElement)

Determine if the package node has the attribute value as the targetValue.

public static bool HasAttributeValue(XElement node, string attributeName, string targetValue, out XElement element)

Parameters

node XElement
attributeName string
targetValue string
element XElement

Returns

bool

TryGetAttribute(XElement, string, out string)

public static bool TryGetAttribute(XElement node, string name, out string value)

Parameters

node XElement
name string
value string

Returns

bool