11 instantiations of LicenseMetadata
Microsoft.DotNet.Build.Tasks.Packaging (1)
GenerateNuSpec.cs (1)
217manifestMetadata.LicenseMetadata = new LicenseMetadata(
NuGet.Build.Tasks.Pack (2)
PackTaskLogic.cs (2)
282return new LicenseMetadata( 309return new LicenseMetadata(
NuGet.CommandLine.XPlat (1)
_generated\8\PackageSearchJsonContext.LicenseMetadata.g.cs (1)
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]),
NuGet.Packaging (6)
NuspecReader.cs (4)
505return new LicenseMetadata(type: licenseType, license: license!, expression: expression, warningsAndErrors: errors, version: version); 515return new LicenseMetadata(type: licenseType, license: license!, expression: null, warningsAndErrors: errors, version: version); 531return new LicenseMetadata(type: licenseType, license: license!, expression: null, warningsAndErrors: errors, version: version); 535return new LicenseMetadata(type: licenseType, license: license!, expression: null, warningsAndErrors: errors, version: version);
PackageCreation\Authoring\ManifestReader.cs (2)
222return new LicenseMetadata(licenseType, license!, expression, warningsAndErrors: null, version: version); 237return new LicenseMetadata(type: licenseType, license: license!, expression: null, warningsAndErrors: null, version: LicenseMetadata.EmptyVersion);
NuGet.Protocol (1)
Model\PackageSearchMetadata.cs (1)
221return new LicenseMetadata(LicenseType.Expression, license: trimmedLicenseExpression, expression: parsedExpression, warningsAndErrors: errors, version: effectiveVersion);
73 references to LicenseMetadata
Microsoft.DotNet.Build.Tasks.Packaging (1)
GenerateNuSpec.cs (1)
222LicenseMetadata.EmptyVersion);
Microsoft.DotNet.Build.Tasks.Workloads (1)
WorkloadPackageBase.cs (1)
81public LicenseMetadata? LicenseData
NuGet.Build.Tasks.Pack (4)
PackTaskLogic.cs (4)
252private LicenseMetadata BuildLicenseMetadata(IPackTaskRequest<IMSBuildItem> request) 277if (version.CompareTo(LicenseMetadata.CurrentVersion) <= 0) 304LicenseMetadata.CurrentVersion)); 325version = LicenseMetadata.EmptyVersion;
NuGet.CommandLine.XPlat (39)
_generated\13\PackageSearchJsonContext.IPackageSearchMetadata.g.cs (3)
471var info21 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::NuGet.Packaging.LicenseMetadata> 486AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Core.Types.IPackageSearchMetadata).GetProperty("LicenseMetadata", InstanceMemberBindingFlags, null, typeof(global::NuGet.Packaging.LicenseMetadata), global::System.Array.Empty<global::System.Type>(), null), 489properties[21] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::NuGet.Packaging.LicenseMetadata>(options, info21);
_generated\36\PackageSearchJsonContext.GetJsonTypeInfo.g.cs (1)
54if (type == typeof(global::NuGet.Packaging.LicenseMetadata))
_generated\8\PackageSearchJsonContext.LicenseMetadata.g.cs (35)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Packaging.LicenseMetadata>? _LicenseMetadata; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Packaging.LicenseMetadata> LicenseMetadata 22get => _LicenseMetadata ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Packaging.LicenseMetadata>)Options.GetTypeInfo(typeof(global::NuGet.Packaging.LicenseMetadata)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Packaging.LicenseMetadata> Create_LicenseMetadata(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::NuGet.Packaging.LicenseMetadata>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Packaging.LicenseMetadata> jsonTypeInfo)) 29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::NuGet.Packaging.LicenseMetadata> 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), 39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::NuGet.Packaging.LicenseMetadata>(options, objectInfo); 56DeclaringType = typeof(global::NuGet.Packaging.LicenseMetadata), 58Getter = static obj => ((global::NuGet.Packaging.LicenseMetadata)obj).Type, 66AttributeProviderFactory = static () => typeof(global::NuGet.Packaging.LicenseMetadata).GetProperty("Type", InstanceMemberBindingFlags, null, typeof(global::NuGet.Packaging.LicenseType), global::System.Array.Empty<global::System.Type>(), null), 76DeclaringType = typeof(global::NuGet.Packaging.LicenseMetadata), 78Getter = static obj => ((global::NuGet.Packaging.LicenseMetadata)obj).License, 86AttributeProviderFactory = static () => typeof(global::NuGet.Packaging.LicenseMetadata).GetProperty("License", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 97DeclaringType = typeof(global::NuGet.Packaging.LicenseMetadata), 99Getter = static obj => ((global::NuGet.Packaging.LicenseMetadata)obj).LicenseExpression, 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), 117DeclaringType = typeof(global::NuGet.Packaging.LicenseMetadata), 119Getter = static obj => ((global::NuGet.Packaging.LicenseMetadata)obj).WarningsAndErrors, 127AttributeProviderFactory = static () => typeof(global::NuGet.Packaging.LicenseMetadata).GetProperty("WarningsAndErrors", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<string>), global::System.Array.Empty<global::System.Type>(), null), 137DeclaringType = typeof(global::NuGet.Packaging.LicenseMetadata), 139Getter = static obj => ((global::NuGet.Packaging.LicenseMetadata)obj).Version, 147AttributeProviderFactory = static () => typeof(global::NuGet.Packaging.LicenseMetadata).GetProperty("Version", InstanceMemberBindingFlags, null, typeof(global::System.Version), global::System.Array.Empty<global::System.Type>(), null), 158DeclaringType = typeof(global::NuGet.Packaging.LicenseMetadata), 160Getter = static obj => ((global::NuGet.Packaging.LicenseMetadata)obj).LicenseUrl, 168AttributeProviderFactory = static () => typeof(global::NuGet.Packaging.LicenseMetadata).GetProperty("LicenseUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 179private void LicenseMetadataSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::NuGet.Packaging.LicenseMetadata? value) 190global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::NuGet.Packaging.LicenseMetadata)value).Type, LicenseType); 191writer.WriteString(PropName_License, ((global::NuGet.Packaging.LicenseMetadata)value).License); 193NuGetLicenseExpressionSerializeHandler(writer, ((global::NuGet.Packaging.LicenseMetadata)value).LicenseExpression); 195IReadOnlyListStringSerializeHandler(writer, ((global::NuGet.Packaging.LicenseMetadata)value).WarningsAndErrors); 197global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::NuGet.Packaging.LicenseMetadata)value).Version, Version); 199global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::NuGet.Packaging.LicenseMetadata)value).LicenseUrl, Uri);
NuGet.Packaging (20)
NuspecReader.cs (4)
434public LicenseMetadata? GetLicenseMetadata() 464version = version ?? LicenseMetadata.EmptyVersion; 481if (version.CompareTo(LicenseMetadata.CurrentVersion) <= 0) 529LicenseMetadata.CurrentVersion));
PackageCreation\Authoring\IPackageMetadata.cs (1)
60LicenseMetadata? LicenseMetadata { get; }
PackageCreation\Authoring\LicenseMetadata.cs (3)
16public class LicenseMetadata : IEquatable<LicenseMetadata> 57public bool Equals(LicenseMetadata? other) 78return Equals(obj as LicenseMetadata);
PackageCreation\Authoring\ManifestMetadata.cs (1)
245public LicenseMetadata? LicenseMetadata { get; set; } = null;
PackageCreation\Authoring\ManifestReader.cs (5)
181private static LicenseMetadata ReadLicenseMetadata(XElement licenseNode) 200version = LicenseMetadata.EmptyVersion; 217if (version.CompareTo(LicenseMetadata.CurrentVersion) <= 0) 234LicenseMetadata.CurrentVersion)); 237return new LicenseMetadata(type: licenseType, license: license!, expression: null, warningsAndErrors: null, version: LicenseMetadata.EmptyVersion);
PackageCreation\Authoring\PackageBuilder.cs (2)
237public LicenseMetadata? LicenseMetadata { get; set; } 624private void ValidateLicenseFile(IEnumerable<IPackageFile> files, LicenseMetadata? licenseMetadata)
PackageCreation\Xml\PackageMetadataXmlExtensions.cs (2)
276private static XElement GetXElementFromLicenseMetadata(XNamespace ns, LicenseMetadata metadata) 281if (!metadata.Version.Equals(LicenseMetadata.EmptyVersion))
Rules\LicenseUrlDeprecationWarning.cs (1)
24var licenseMetadata = nuspecReader?.GetLicenseMetadata();
Rules\UnrecognizedLicenseIdentifierRule.cs (1)
25var licenseMetadata = nuspecReader?.GetLicenseMetadata();
NuGet.Protocol (8)
Model\IPackageSearchMetadata.cs (1)
43LicenseMetadata LicenseMetadata { get; }
Model\LocalPackageSearchMetadata.cs (1)
136public LicenseMetadata LicenseMetadata => _nuspec.GetLicenseMetadata();
Model\PackageSearchMetadata.cs (4)
163public LicenseMetadata LicenseMetadata 175effectiveVersion = effectiveVersion ?? LicenseMetadata.EmptyVersion; 180if (effectiveVersion.CompareTo(LicenseMetadata.CurrentVersion) <= 0) 218LicenseMetadata.CurrentVersion));
Model\PackageSearchMetadataBuilder.cs (1)
53public LicenseMetadata LicenseMetadata { get; set; }
Model\PackageSearchMetadataV2Feed.cs (1)
135public LicenseMetadata LicenseMetadata { get; } = null; // The LicenseExpression is not added to the V2 feed.