namespace StardewModdingAPI.Common.Models { /// Generic metadata about a mod. internal class ModInfoModel { /********* ** Accessors *********/ /// The mod name. public string Name { get; set; } /// The mod's semantic version number. public string Version { get; set; } /// The mod's web URL. public string Url { get; set; } /// The error message indicating why the mod is invalid (if applicable). public string Error { get; set; } /********* ** Public methods *********/ /// Construct an empty instance. public ModInfoModel() { // needed for JSON deserialising } /// Construct an instance. /// The mod name. /// The mod's semantic version number. /// The mod's web URL. /// The error message indicating why the mod is invalid (if applicable). public ModInfoModel(string name, string version, string url, string error = null) { this.Name = name; this.Version = version; this.Url = url; this.Error = error; // mainly initialised here for the JSON deserialiser } /// Construct an instance. /// The error message indicating why the mod is invalid. public ModInfoModel(string error) { this.Error = error; } } }