2 types derived from NuGetLicenseExpression
NuGet.Packaging (2)
Licenses\LicenseOperator.cs (1)
10public abstract class LicenseOperator : NuGetLicenseExpression
Licenses\NuGetLicense.cs (1)
13public class NuGetLicense : NuGetLicenseExpression
53 references to NuGetLicenseExpression
Microsoft.DotNet.Build.Tasks.Packaging (1)
GenerateNuSpec.cs (1)
220expression: NuGetLicenseExpression.Parse(PackageLicenseExpression),
NuGet.Build.Tasks.Pack (2)
PackTaskLogic.cs (2)
281var expression = NuGetLicenseExpression.Parse(request.PackageLicenseExpression);
NuGet.CommandLine.XPlat (21)
_generated\10\PackageSearchJsonContext.NuGetLicenseExpression.g.cs (14)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Packaging.Licenses.NuGetLicenseExpression>? _NuGetLicenseExpression; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Packaging.Licenses.NuGetLicenseExpression> NuGetLicenseExpression 22get => _NuGetLicenseExpression ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Packaging.Licenses.NuGetLicenseExpression>)Options.GetTypeInfo(typeof(global::NuGet.Packaging.Licenses.NuGetLicenseExpression)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Packaging.Licenses.NuGetLicenseExpression> Create_NuGetLicenseExpression(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::NuGet.Packaging.Licenses.NuGetLicenseExpression>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Packaging.Licenses.NuGetLicenseExpression> jsonTypeInfo)) 29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::NuGet.Packaging.Licenses.NuGetLicenseExpression> 39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::NuGet.Packaging.Licenses.NuGetLicenseExpression>(options, objectInfo); 56DeclaringType = typeof(global::NuGet.Packaging.Licenses.NuGetLicenseExpression), 58Getter = static obj => ((global::NuGet.Packaging.Licenses.NuGetLicenseExpression)obj).Type, 66AttributeProviderFactory = static () => typeof(global::NuGet.Packaging.Licenses.NuGetLicenseExpression).GetProperty("Type", InstanceMemberBindingFlags, null, typeof(global::NuGet.Packaging.Licenses.LicenseExpressionType), global::System.Array.Empty<global::System.Type>(), null), 76private void NuGetLicenseExpressionSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::NuGet.Packaging.Licenses.NuGetLicenseExpression? value) 87global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::NuGet.Packaging.Licenses.NuGetLicenseExpression)value).Type, LicenseExpressionType);
_generated\36\PackageSearchJsonContext.GetJsonTypeInfo.g.cs (1)
62if (type == typeof(global::NuGet.Packaging.Licenses.NuGetLicenseExpression))
_generated\8\PackageSearchJsonContext.LicenseMetadata.g.cs (6)
32ObjectWithParameterizedConstructorCreator = static args => new global::NuGet.Packaging.LicenseMetadata((global::NuGet.Packaging.LicenseType)args[0], (string)args[1], (global::NuGet.Packaging.Licenses.NuGetLicenseExpression)args[2], (global::System.Collections.Generic.IReadOnlyList<string>)args[3], (global::System.Version)args[4]), 35ConstructorAttributeProviderFactory = static () => typeof(global::NuGet.Packaging.LicenseMetadata).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::NuGet.Packaging.LicenseType), typeof(string), typeof(global::NuGet.Packaging.Licenses.NuGetLicenseExpression), typeof(global::System.Collections.Generic.IReadOnlyList<string>), typeof(global::System.Version)}, modifiers: null), 92var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::NuGet.Packaging.Licenses.NuGetLicenseExpression> 107AttributeProviderFactory = static () => typeof(global::NuGet.Packaging.LicenseMetadata).GetProperty("LicenseExpression", InstanceMemberBindingFlags, null, typeof(global::NuGet.Packaging.Licenses.NuGetLicenseExpression), global::System.Array.Empty<global::System.Type>(), null), 110properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::NuGet.Packaging.Licenses.NuGetLicenseExpression>(options, info2); 229ParameterType = typeof(global::NuGet.Packaging.Licenses.NuGetLicenseExpression),
NuGet.Packaging (26)
Licenses\LicenseExpressionType.cs (1)
7/// Represents the expression type of a <see cref="NuGetLicenseExpression"/>.
Licenses\LicenseOperatorType.cs (1)
7/// Represents the type of <see cref="LicenseOperator"/> <see cref="NuGetLicenseExpression"/>.
Licenses\LogicalOperator.cs (5)
12/// This operator will always have a left and a right side, both of which are <see cref="NuGetLicenseExpression"/> and never null. 16public LogicalOperator(LogicalOperatorType logicalOperatorType, NuGetLicenseExpression left, NuGetLicenseExpression right) : 27public NuGetLicenseExpression Left { get; } 28public NuGetLicenseExpression Right { get; }
Licenses\NuGetLicenseExpression.cs (1)
33public static NuGetLicenseExpression Parse(string expression)
Licenses\NuGetLicenseExpressionExtensions.cs (3)
15public static bool HasOnlyStandardIdentifiers(this NuGetLicenseExpression expression) 47public static void OnEachLeafNode(this NuGetLicenseExpression expression, Action<NuGetLicense>? licenseProcessor, Action<NuGetLicenseException>? exceptionProcessor) 87public static bool IsUnlicensed(this NuGetLicenseExpression expression)
Licenses\NuGetLicenseExpressionParser.cs (6)
28internal static NuGetLicenseExpression Parse(string expression) 138return value.Item1 ? NuGetLicense.ParseIdentifier(((LicenseExpressionToken)value.Item2).Value, allowUnlicensed: true) : (NuGetLicenseExpression)value.Item2; 189var right = rightOperand.Item1 ? 191(NuGetLicenseExpression)rightOperand.Item2; 193var left = leftOperand.Item1 ? 195(NuGetLicenseExpression)leftOperand.Item2;
Licenses\WithOperator.cs (1)
9/// Represents a <see cref="NuGetLicenseExpression"/> that's a WITH operator.
NuspecReader.cs (3)
485var expression = NuGetLicenseExpression.Parse(license!); 541private static IList<string>? GetNonStandardLicenseIdentifiers(NuGetLicenseExpression expression)
PackageCreation\Authoring\LicenseMetadata.cs (2)
36public NuGetLicenseExpression? LicenseExpression { get; } 48public LicenseMetadata(LicenseType type, string license, NuGetLicenseExpression? expression, IReadOnlyList<string>? warningsAndErrors, Version version)
PackageCreation\Authoring\ManifestReader.cs (2)
221var expression = NuGetLicenseExpression.Parse(license!);
Rules\UnrecognizedLicenseIdentifierRule.cs (1)
35private void ValidateAllLicenseLeafs(NuGetLicenseExpression expression, IList<PackagingLogMessage> logMessages)
NuGet.Protocol (3)
Model\PackageSearchMetadata.cs (3)
178NuGetLicenseExpression parsedExpression = null; 184parsedExpression = NuGetLicenseExpression.Parse(trimmedLicenseExpression); 225private static IList<string> GetNonStandardLicenseIdentifiers(NuGetLicenseExpression expression)