From 0b2e46d55cb09a169c7bb64ade37c82fc8233cb3 Mon Sep 17 00:00:00 2001 From: Dan Volchek Date: Sun, 10 Jun 2018 15:05:59 -0700 Subject: refactor IModMetadata update info --- .../Framework/ModUpdateChecking/ModUpdateStatus.cs | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/SMAPI/Framework/ModUpdateChecking/ModUpdateStatus.cs (limited to 'src/SMAPI/Framework/ModUpdateChecking') diff --git a/src/SMAPI/Framework/ModUpdateChecking/ModUpdateStatus.cs b/src/SMAPI/Framework/ModUpdateChecking/ModUpdateStatus.cs new file mode 100644 index 00000000..7f588b66 --- /dev/null +++ b/src/SMAPI/Framework/ModUpdateChecking/ModUpdateStatus.cs @@ -0,0 +1,32 @@ +namespace StardewModdingAPI.Framework.ModUpdateChecking +{ + /// Update status for a mod. + internal class ModUpdateStatus + { + /********* + ** Accessors + *********/ + /// The version that this mod can be updated to (if any). + public ISemanticVersion Version { get; } + + /// The error checking for updates of this mod (if any). + public string Error { get; } + + /********* + ** Public methods + *********/ + /// Construct an instance. + /// The version that this mod can be update to. + public ModUpdateStatus(ISemanticVersion version) + { + this.Version = version; + } + + /// Construct an instance. + /// The error checking for updates of this mod. + public ModUpdateStatus(string error) + { + this.Error = error; + } + } +} -- cgit