using System; using JetBrains.Annotations; using INugetPackageIdentifierPluginAPI = NugetForUnity.PluginAPI.Models.INugetPackageIdentifier; namespace NugetForUnity.Models { /// /// Interface for a versioned NuGet package. /// public interface INugetPackageIdentifier : INugetPackageIdentifierPluginAPI, IEquatable, IComparable { /// /// Gets or sets a value indicating whether this package was installed manually or just as a dependency. /// bool IsManuallyInstalled { get; set; } /// /// Gets a value indicating whether the version number specified is a range of values. /// bool HasVersionRange { get; } /// /// Gets a value indicating whether this is a prerelease package or an official release package. /// bool IsPrerelease { get; } /// /// Gets or sets the typed version number of the NuGet package. /// [NotNull] NugetPackageVersion PackageVersion { get; set; } /// /// Gets the name of the '.nupkg' file that contains the whole package content as a ZIP. /// [NotNull] string PackageFileName { get; } /// /// Gets the name of the '.nuspec' file that contains metadata of this NuGet package's. /// [NotNull] string SpecificationFileName { get; } /// /// Determines if the given 's version is in the version range of this /// . /// See here: https://docs.nuget.org/ndocs/create-packages/dependency-versions. /// /// The whose version to check if is in the range. /// True if the given version is in the range, otherwise false. bool InRange([NotNull] INugetPackageIdentifier otherPackage); /// /// Determines if the given is in the version range of this . /// See here: https://docs.nuget.org/ndocs/create-packages/dependency-versions. /// /// The to check if is in the range. /// True if the given version is in the range, otherwise false. bool InRange([NotNull] NugetPackageVersion otherVersion); } }