diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2023-04-09 13:12:30 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2023-04-09 13:12:30 -0400 |
commit | 5486146a05dec8a5c09e9585e5b610b89feaf731 (patch) | |
tree | 52c91cb3c4349976ec77877b963d444cadd4587c /src/SMAPI.Web/Framework/Clients/UpdateManifest/ResponseModels/UpdateManifestModel.cs | |
parent | 53e0e8cd2410e63c7725206db4a8156cc460d111 (diff) | |
parent | a4b193b920879b7db255f387af8e3c9b4fa2b46a (diff) | |
download | SMAPI-5486146a05dec8a5c09e9585e5b610b89feaf731.tar.gz SMAPI-5486146a05dec8a5c09e9585e5b610b89feaf731.tar.bz2 SMAPI-5486146a05dec8a5c09e9585e5b610b89feaf731.zip |
Merge pull request #876 from jltaylor-us/update-manifest
Add `UpdateManifest` update keys
Diffstat (limited to 'src/SMAPI.Web/Framework/Clients/UpdateManifest/ResponseModels/UpdateManifestModel.cs')
-rw-r--r-- | src/SMAPI.Web/Framework/Clients/UpdateManifest/ResponseModels/UpdateManifestModel.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/SMAPI.Web/Framework/Clients/UpdateManifest/ResponseModels/UpdateManifestModel.cs b/src/SMAPI.Web/Framework/Clients/UpdateManifest/ResponseModels/UpdateManifestModel.cs new file mode 100644 index 00000000..5ccd31b0 --- /dev/null +++ b/src/SMAPI.Web/Framework/Clients/UpdateManifest/ResponseModels/UpdateManifestModel.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; + +namespace StardewModdingAPI.Web.Framework.Clients.UpdateManifest.ResponseModels +{ + /// <summary>The data model for an update manifest file.</summary> + internal class UpdateManifestModel + { + /********* + ** Accessors + *********/ + /// <summary>The manifest format version. This is equivalent to the SMAPI version, and is used to parse older manifests correctly if later versions of SMAPI change the expected format.</summary> + public string Format { get; } + + /// <summary>The mod info in this update manifest.</summary> + public IDictionary<string, UpdateManifestModModel> Mods { get; } + + + /********* + ** Public methods + *********/ + /// <summary>Construct an instance.</summary> + /// <param name="format">The manifest format version.</param> + /// <param name="mods">The mod info in this update manifest.</param> + public UpdateManifestModel(string format, IDictionary<string, UpdateManifestModModel>? mods) + { + this.Format = format; + this.Mods = mods ?? new Dictionary<string, UpdateManifestModModel>(); + } + } +} |