// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.IO; using NuGet.Frameworks; using NuGet.Packaging; using NuGet.Versioning; namespace RepoTasks.ProjectModel { internal class PackageInfo { public PackageInfo(string id, NuGetVersion version, IReadOnlyList dependencyGroups, string source, string packageType = "Dependency") { if (string.IsNullOrEmpty(id)) { throw new ArgumentException(nameof(id)); } Id = id; Version = version ?? throw new ArgumentNullException(nameof(version)); PackageType = packageType; Source = source; DependencyGroups = dependencyGroups ?? Array.Empty(); } public string Id { get; } public NuGetVersion Version { get; } public string PackageType { get; } /// /// Can be a https feed or a file path. May be null. /// public string Source { get; } public IReadOnlyList DependencyGroups { get; } } }