using System;
namespace StardewModdingAPI
{
/// A semantic version with an optional release tag.
public interface ISemanticVersion : IComparable, IEquatable
{
/*********
** Accessors
*********/
/// The major version incremented for major API changes.
int MajorVersion { get; }
/// The minor version incremented for backwards-compatible changes.
int MinorVersion { get; }
/// The patch version for backwards-compatible bug fixes.
int PatchVersion { get; }
/// An optional build tag.
string Build { get; }
/*********
** Accessors
*********/
/// Whether this is a pre-release version.
bool IsPrerelease();
/// Get whether this version is older than the specified version.
/// The version to compare with this instance.
bool IsOlderThan(ISemanticVersion other);
/// Get whether this version is older than the specified version.
/// The version to compare with this instance.
/// The specified version is not a valid semantic version.
bool IsOlderThan(string other);
/// Get whether this version is newer than the specified version.
/// The version to compare with this instance.
bool IsNewerThan(ISemanticVersion other);
/// Get whether this version is newer than the specified version.
/// The version to compare with this instance.
/// The specified version is not a valid semantic version.
bool IsNewerThan(string other);
/// Get whether this version is between two specified versions (inclusively).
/// The minimum version.
/// The maximum version.
bool IsBetween(ISemanticVersion min, ISemanticVersion max);
/// Get whether this version is between two specified versions (inclusively).
/// The minimum version.
/// The maximum version.
/// One of the specified versions is not a valid semantic version.
bool IsBetween(string min, string max);
/// Get a string representation of the version.
string ToString();
}
}