summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/ViewModels/ModListModel.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-01 18:16:09 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-01 18:16:09 -0400
commitc8ad50dad1d706a1901798f9396f6becfea36c0e (patch)
tree28bd818a5db39ec5ece1bd141a28de955950463b /src/SMAPI.Web/ViewModels/ModListModel.cs
parent451b70953ff4c0b1b27ae0de203ad99379b45b2a (diff)
parentf78093bdb58d477b400cde3f19b70ffd6ddf833d (diff)
downloadSMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.tar.gz
SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.tar.bz2
SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Web/ViewModels/ModListModel.cs')
-rw-r--r--src/SMAPI.Web/ViewModels/ModListModel.cs17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/SMAPI.Web/ViewModels/ModListModel.cs b/src/SMAPI.Web/ViewModels/ModListModel.cs
index 6b8279c1..be9f973a 100644
--- a/src/SMAPI.Web/ViewModels/ModListModel.cs
+++ b/src/SMAPI.Web/ViewModels/ModListModel.cs
@@ -11,37 +11,34 @@ namespace StardewModdingAPI.Web.ViewModels
** Accessors
*********/
/// <summary>The current stable version of the game.</summary>
- public string StableVersion { get; set; }
+ public string? StableVersion { get; }
/// <summary>The current beta version of the game (if any).</summary>
- public string BetaVersion { get; set; }
+ public string? BetaVersion { get; }
/// <summary>The mods to display.</summary>
- public ModModel[] Mods { get; set; }
+ public ModModel[] Mods { get; }
/// <summary>When the data was last updated.</summary>
- public DateTimeOffset LastUpdated { get; set; }
+ public DateTimeOffset LastUpdated { get; }
/// <summary>Whether the data hasn't been updated in a while.</summary>
- public bool IsStale { get; set; }
+ public bool IsStale { get; }
/// <summary>Whether the mod metadata is available.</summary>
- public bool HasData => this.Mods?.Any() == true;
+ public bool HasData => this.Mods.Any();
/*********
** Public methods
*********/
- /// <summary>Construct an empty instance.</summary>
- public ModListModel() { }
-
/// <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>
/// <param name="lastUpdated">When the data was last updated.</param>
/// <param name="isStale">Whether the data hasn't been updated in a while.</param>
- public ModListModel(string stableVersion, string betaVersion, IEnumerable<ModModel> mods, DateTimeOffset lastUpdated, bool isStale)
+ public ModListModel(string? stableVersion, string? betaVersion, IEnumerable<ModModel> mods, DateTimeOffset lastUpdated, bool isStale)
{
this.StableVersion = stableVersion;
this.BetaVersion = betaVersion;