Table of Contents

Class NuGetLicenseExpressionExtensions

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

Methods

HasOnlyStandardIdentifiers(NuGetLicenseExpression)

Determines whether all the licenses and exceptions are not deprecated.

public static bool HasOnlyStandardIdentifiers(this NuGetLicenseExpression expression)

Parameters

expression NuGetLicenseExpression

expression to be validated

Returns

bool

Whether this expression consists of licenses with standard identifiers

IsUnlicensed(NuGetLicense)

public static bool IsUnlicensed(this NuGetLicense license)

Parameters

license NuGetLicense

Returns

bool

IsUnlicensed(NuGetLicenseExpression)

public static bool IsUnlicensed(this NuGetLicenseExpression expression)

Parameters

expression NuGetLicenseExpression

Returns

bool

OnEachLeafNode(NuGetLicenseExpression, Action<NuGetLicense>, Action<NuGetLicenseException>)

A leaf node in an expression can only be a License or an Exception. Run a func on each one.

public static void OnEachLeafNode(this NuGetLicenseExpression expression, Action<NuGetLicense> licenseProcessor, Action<NuGetLicenseException> exceptionProcessor)

Parameters

expression NuGetLicenseExpression

The expression to be walked.

licenseProcessor Action<NuGetLicense>

A processor for the licenses.

exceptionProcessor Action<NuGetLicenseException>

A processor for the exceptions.