From 0b48c1748b354458059c7607415288de072b01e9 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 12 Apr 2022 19:15:39 -0400 Subject: enable nullable annotations in the web project & related code (#837) --- .../Framework/Clients/Wiki/WikiModList.cs | 23 +++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiModList.cs') diff --git a/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiModList.cs b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiModList.cs index 1787197a..24548078 100644 --- a/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiModList.cs +++ b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiModList.cs @@ -1,5 +1,3 @@ -#nullable disable - namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki { /// Metadata from the wiki's mod compatibility list. @@ -9,12 +7,27 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki ** Accessors *********/ /// The stable game version. - public string StableVersion { get; set; } + public string? StableVersion { get; } /// The beta game version (if any). - public string BetaVersion { get; set; } + public string? BetaVersion { get; } /// The mods on the wiki. - public WikiModEntry[] Mods { get; set; } + public WikiModEntry[] Mods { get; } + + + /********* + ** Public methods + *********/ + /// Construct an instance. + /// The stable game version. + /// The beta game version (if any). + /// The mods on the wiki. + public WikiModList(string? stableVersion, string? betaVersion, WikiModEntry[] mods) + { + this.StableVersion = stableVersion; + this.BetaVersion = betaVersion; + this.Mods = mods; + } } } -- cgit