using Newtonsoft.Json;
namespace StardewModdingAPI.Framework
{
/// An implementation of that hamdles the legacy version format.
internal class LegacyManifestVersion : SemanticVersion
{
/*********
** Public methods
*********/
/// Construct an instance.
/// The major version incremented for major API changes.
/// The minor version incremented for backwards-compatible changes.
/// The patch version for backwards-compatible bug fixes.
/// An optional build tag.
[JsonConstructor]
public LegacyManifestVersion(int majorVersion, int minorVersion, int patchVersion, string build = null)
: base(
majorVersion,
minorVersion,
patchVersion,
build != "0" ? build : null // '0' from incorrect examples in old SMAPI documentation
)
{ }
}
}