using System.Collections.Generic; using System.Threading.Tasks; using JetBrains.Annotations; using NugetForUnity.PackageSource; using UnityEngine; using INugetPackagePluginAPI = NugetForUnity.PluginAPI.Models.INugetPackage; namespace NugetForUnity.Models { /// /// Represents a NuGet package. /// public interface INugetPackage : INugetPackageIdentifier, INugetPackagePluginAPI { /// /// Gets a list of all available versions of the package in a descending order. /// [NotNull] List Versions { get; } /// /// Gets the authors of the package. /// [NotNull] List Authors { get; } /// /// Gets the NuGet packages that this NuGet package depends on grouped by target framework. /// [NotNull] List Dependencies { get; } /// /// Gets the description of the NuGet package. /// [CanBeNull] string Description { get; } /// /// Gets the release notes of the NuGet package. /// [CanBeNull] string ReleaseNotes { get; } /// /// Gets the type of source control software that the package's source code resides in. /// RepositoryType RepositoryType { get; } /// /// Gets the URL for the location of the package's source code. /// [CanBeNull] string RepositoryUrl { get; } /// /// Gets the source control commit the package is from. /// [CanBeNull] string RepositoryCommit { get; } /// /// Gets the total number of downloads all versions of the package have in total. /// long TotalDownloads { get; } /// /// Gets the URL for the location of the license of the NuGet package. /// [CanBeNull] string LicenseUrl { get; } /// /// Gets the that contains this package. /// [NotNull] INugetPackageSource PackageSource { get; } /// /// Gets the summary of the NuGet package. /// [CanBeNull] string Summary { get; } /// /// Gets the icon for the package as a task returning a . /// [ItemCanBeNull] [CanBeNull] Task IconTask { get; } /// /// Gets the list of dependencies for the framework that best matches what is available in Unity. /// /// List of dependencies. new IReadOnlyList CurrentFrameworkDependencies { get; } /// /// Asynchronously gets the NuGet packages that this NuGet package depends on grouped by target framework. /// /// The task that fetches . [NotNull] [ItemNotNull] Task> GetDependenciesAsync(); /// /// Download the .nupkg file and store it inside a file at . /// /// Path where the downloaded file is placed. void DownloadNupkgToFile([NotNull] string outputFilePath); } }