diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-06-19 19:13:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-19 19:13:19 -0400 |
commit | 4a05cd09b66a9ec37522aa656ab0814095ab6d23 (patch) | |
tree | 1264a442c5a8c9e6977e017166bdc489e9e51322 /src/SMAPI/Framework/ModUpdateChecking/ModUpdateStatus.cs | |
parent | 645a64cd24146edba44b89f7493ba5ea9950c3c8 (diff) | |
parent | 468eea751dff9c7c70f0eb33eb91adf98b79cf9d (diff) | |
download | SMAPI-4a05cd09b66a9ec37522aa656ab0814095ab6d23.tar.gz SMAPI-4a05cd09b66a9ec37522aa656ab0814095ab6d23.tar.bz2 SMAPI-4a05cd09b66a9ec37522aa656ab0814095ab6d23.zip |
Merge pull request #543 from danvolchek/optional-update-checking
Add version info to IModMetadata, Change update checks to consider preview versions
Diffstat (limited to 'src/SMAPI/Framework/ModUpdateChecking/ModUpdateStatus.cs')
-rw-r--r-- | src/SMAPI/Framework/ModUpdateChecking/ModUpdateStatus.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/ModUpdateChecking/ModUpdateStatus.cs b/src/SMAPI/Framework/ModUpdateChecking/ModUpdateStatus.cs new file mode 100644 index 00000000..efb32aef --- /dev/null +++ b/src/SMAPI/Framework/ModUpdateChecking/ModUpdateStatus.cs @@ -0,0 +1,37 @@ +namespace StardewModdingAPI.Framework.ModUpdateChecking +{ + /// <summary>Update status for a mod.</summary> + internal class ModUpdateStatus + { + /********* + ** Accessors + *********/ + /// <summary>The version that this mod can be updated to (if any).</summary> + public ISemanticVersion Version { get; } + + /// <summary>The error checking for updates of this mod (if any).</summary> + public string Error { get; } + + /********* + ** Public methods + *********/ + /// <summary>Construct an instance.</summary> + /// <param name="version">The version that this mod can be update to.</param> + public ModUpdateStatus(ISemanticVersion version) + { + this.Version = version; + } + + /// <summary>Construct an instance.</summary> + /// <param name="error">The error checking for updates of this mod.</param> + public ModUpdateStatus(string error) + { + this.Error = error; + } + + /// <summary>Construct an instance.</summary> + public ModUpdateStatus() + { + } + } +} |