summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Clients/ModDrop/ResponseModels/ModDataModel.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/ModDrop/ResponseModels/ModDataModel.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/ModDrop/ResponseModels/ModDataModel.cs')
-rw-r--r--src/SMAPI.Web/Framework/Clients/ModDrop/ResponseModels/ModDataModel.cs24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/SMAPI.Web/Framework/Clients/ModDrop/ResponseModels/ModDataModel.cs b/src/SMAPI.Web/Framework/Clients/ModDrop/ResponseModels/ModDataModel.cs
index 6cae16d9..0654b576 100644
--- a/src/SMAPI.Web/Framework/Clients/ModDrop/ResponseModels/ModDataModel.cs
+++ b/src/SMAPI.Web/Framework/Clients/ModDrop/ResponseModels/ModDataModel.cs
@@ -1,17 +1,33 @@
-#nullable disable
-
namespace StardewModdingAPI.Web.Framework.Clients.ModDrop.ResponseModels
{
/// <summary>Metadata about a mod from the ModDrop API.</summary>
public class ModDataModel
{
+ /*********
+ ** Accessors
+ *********/
/// <summary>The mod's unique ID on ModDrop.</summary>
public int ID { get; set; }
+ /// <summary>The mod name.</summary>
+ public string Title { get; set; }
+
/// <summary>The error code, if any.</summary>
public int? ErrorCode { get; set; }
- /// <summary>The mod name.</summary>
- public string Title { get; set; }
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="id">The mod's unique ID on ModDrop.</param>
+ /// <param name="title">The mod name.</param>
+ /// <param name="errorCode">The error code, if any.</param>
+ public ModDataModel(int id, string title, int? errorCode)
+ {
+ this.ID = id;
+ this.Title = title;
+ this.ErrorCode = errorCode;
+ }
}
}