diff options
Diffstat (limited to 'src/SMAPI.Web/ViewModels/ModListModel.cs')
-rw-r--r-- | src/SMAPI.Web/ViewModels/ModListModel.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/SMAPI.Web/ViewModels/ModListModel.cs b/src/SMAPI.Web/ViewModels/ModListModel.cs new file mode 100644 index 00000000..3b87d393 --- /dev/null +++ b/src/SMAPI.Web/ViewModels/ModListModel.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; +using System.Linq; + +namespace StardewModdingAPI.Web.ViewModels +{ + /// <summary>Metadata for the mod list page.</summary> + public class ModListModel + { + /********* + ** Accessors + *********/ + /// <summary>The current stable version of the game.</summary> + public string StableVersion { get; set; } + + /// <summary>The current beta version of the game (if any).</summary> + public string BetaVersion { get; set; } + + /// <summary>The mods to display.</summary> + public ModModel[] Mods { get; set; } + + + /********* + ** Public methods + *********/ + /// <summary>Construct an instance.</summary> + /// <param name="stableVersion">The current stable version of the game.</param> + /// <param name="betaVersion">The current beta version of the game (if any).</param> + /// <param name="mods">The mods to display.</param> + public ModListModel(string stableVersion, string betaVersion, IEnumerable<ModModel> mods) + { + this.StableVersion = stableVersion; + this.BetaVersion = betaVersion; + this.Mods = mods.ToArray(); + } + } +} |