summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Clients/CurseForge/ResponseModels/ModModel.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-12 19:15:39 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-12 19:15:39 -0400
commit0b48c1748b354458059c7607415288de072b01e9 (patch)
treef63fd950f565d363414eb692be9024895cdea174 /src/SMAPI.Web/Framework/Clients/CurseForge/ResponseModels/ModModel.cs
parent9fbed0fa1f28a9b0fe0b952a78b10e2d475adb03 (diff)
downloadSMAPI-0b48c1748b354458059c7607415288de072b01e9.tar.gz
SMAPI-0b48c1748b354458059c7607415288de072b01e9.tar.bz2
SMAPI-0b48c1748b354458059c7607415288de072b01e9.zip
enable nullable annotations in the web project & related code (#837)
Diffstat (limited to 'src/SMAPI.Web/Framework/Clients/CurseForge/ResponseModels/ModModel.cs')
-rw-r--r--src/SMAPI.Web/Framework/Clients/CurseForge/ResponseModels/ModModel.cs30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/SMAPI.Web/Framework/Clients/CurseForge/ResponseModels/ModModel.cs b/src/SMAPI.Web/Framework/Clients/CurseForge/ResponseModels/ModModel.cs
index a95df7f1..fd7796f2 100644
--- a/src/SMAPI.Web/Framework/Clients/CurseForge/ResponseModels/ModModel.cs
+++ b/src/SMAPI.Web/Framework/Clients/CurseForge/ResponseModels/ModModel.cs
@@ -1,20 +1,38 @@
-#nullable disable
-
namespace StardewModdingAPI.Web.Framework.Clients.CurseForge.ResponseModels
{
/// <summary>An mod from the CurseForge API.</summary>
public class ModModel
{
+ /*********
+ ** Accessors
+ *********/
/// <summary>The mod's unique ID on CurseForge.</summary>
- public int ID { get; set; }
+ public int ID { get; }
/// <summary>The mod name.</summary>
- public string Name { get; set; }
+ public string Name { get; }
/// <summary>The web URL for the mod page.</summary>
- public string WebsiteUrl { get; set; }
+ public string WebsiteUrl { get; }
/// <summary>The available file downloads.</summary>
- public ModFileModel[] LatestFiles { get; set; }
+ public ModFileModel[] LatestFiles { get; }
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="id">The mod's unique ID on CurseForge.</param>
+ /// <param name="name">The mod name.</param>
+ /// <param name="websiteUrl">The web URL for the mod page.</param>
+ /// <param name="latestFiles">The available file downloads.</param>
+ public ModModel(int id, string name, string websiteUrl, ModFileModel[] latestFiles)
+ {
+ this.ID = id;
+ this.Name = name;
+ this.WebsiteUrl = websiteUrl;
+ this.LatestFiles = latestFiles;
+ }
}
}