diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-08-09 01:18:05 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-09-14 19:08:06 -0400 |
commit | fd77ae93d59222d70c86aebfc044f3af11063372 (patch) | |
tree | 76fac6ffc0cac70fb44f8b9ffc72471a2796a02f /src/SMAPI.Toolkit/Serialization/Models/ManifestDependency.cs | |
parent | 3f6865e8301535c8fbe83bc0f931a116adac0636 (diff) | |
download | SMAPI-fd77ae93d59222d70c86aebfc044f3af11063372.tar.gz SMAPI-fd77ae93d59222d70c86aebfc044f3af11063372.tar.bz2 SMAPI-fd77ae93d59222d70c86aebfc044f3af11063372.zip |
fix typos and inconsistent spelling
Diffstat (limited to 'src/SMAPI.Toolkit/Serialization/Models/ManifestDependency.cs')
-rw-r--r-- | src/SMAPI.Toolkit/Serialization/Models/ManifestDependency.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/SMAPI.Toolkit/Serialization/Models/ManifestDependency.cs b/src/SMAPI.Toolkit/Serialization/Models/ManifestDependency.cs new file mode 100644 index 00000000..00f168f4 --- /dev/null +++ b/src/SMAPI.Toolkit/Serialization/Models/ManifestDependency.cs @@ -0,0 +1,35 @@ +namespace StardewModdingAPI.Toolkit.Serialization.Models +{ + /// <summary>A mod dependency listed in a mod manifest.</summary> + public class ManifestDependency : IManifestDependency + { + /********* + ** Accessors + *********/ + /// <summary>The unique mod ID to require.</summary> + public string UniqueID { get; set; } + + /// <summary>The minimum required version (if any).</summary> + public ISemanticVersion MinimumVersion { get; set; } + + /// <summary>Whether the dependency must be installed to use the mod.</summary> + public bool IsRequired { get; set; } + + + /********* + ** Public methods + *********/ + /// <summary>Construct an instance.</summary> + /// <param name="uniqueID">The unique mod ID to require.</param> + /// <param name="minimumVersion">The minimum required version (if any).</param> + /// <param name="required">Whether the dependency must be installed to use the mod.</param> + public ManifestDependency(string uniqueID, string minimumVersion, bool required = true) + { + this.UniqueID = uniqueID; + this.MinimumVersion = !string.IsNullOrWhiteSpace(minimumVersion) + ? new SemanticVersion(minimumVersion) + : null; + this.IsRequired = required; + } + } +} |