SMAPI/StardewModdingAPI/Version.cs

23 lines
614 B
C#
Raw Normal View History

using Newtonsoft.Json;
2016-03-24 01:43:11 +08:00
namespace StardewModdingAPI
{
public struct Version
{
public int MajorVersion { get; set; }
public int MinorVersion { get; set; }
public int PatchVersion { get; set; }
public string Build { get; set; }
[JsonIgnore]
public string VersionString => $"{MajorVersion}.{MinorVersion}.{PatchVersion} {Build}";
public Version(int major, int minor, int patch, string build)
{
MajorVersion = major;
MinorVersion = minor;
PatchVersion = patch;
Build = build;
}
}
}