diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-12-18 16:58:47 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-12-18 16:58:47 -0500 |
commit | a8cc3636995c9fc5eb08fa9d42129a05d79bb666 (patch) | |
tree | 77cab46ff9f0ef0e5c9e4672c48826d28f9a369a | |
parent | 23988a3c33a7a1616c2d36a2c4b7e3a2d06f4216 (diff) | |
download | SMAPI-a8cc3636995c9fc5eb08fa9d42129a05d79bb666.tar.gz SMAPI-a8cc3636995c9fc5eb08fa9d42129a05d79bb666.tar.bz2 SMAPI-a8cc3636995c9fc5eb08fa9d42129a05d79bb666.zip |
fix legacy version wrapper not implementing ToString method (#197)
-rw-r--r-- | src/StardewModdingAPI/ISemanticVersion.cs | 3 | ||||
-rw-r--r-- | src/StardewModdingAPI/Version.cs | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/ISemanticVersion.cs b/src/StardewModdingAPI/ISemanticVersion.cs index f50752fe..3b9bdb44 100644 --- a/src/StardewModdingAPI/ISemanticVersion.cs +++ b/src/StardewModdingAPI/ISemanticVersion.cs @@ -31,5 +31,8 @@ namespace StardewModdingAPI /// <summary>Get whether this version is newer than the specified version.</summary> /// <param name="other">The version to compare with this instance.</param> bool IsNewerThan(ISemanticVersion other); + + /// <summary>Get a string representation of the version.</summary> + string ToString(); } }
\ No newline at end of file diff --git a/src/StardewModdingAPI/Version.cs b/src/StardewModdingAPI/Version.cs index 9c13381a..87cd4f3d 100644 --- a/src/StardewModdingAPI/Version.cs +++ b/src/StardewModdingAPI/Version.cs @@ -85,6 +85,11 @@ namespace StardewModdingAPI return this.GetSemanticVersion().IsNewerThan(other); } + /// <summary>Get a string representation of the version.</summary> + public override string ToString() + { + return this.GetSemanticVersion().ToString(); + } /********* ** Private methods |