summaryrefslogtreecommitdiff
path: root/src/SMAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-10-29 23:15:18 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-10-29 23:15:18 -0400
commit1bea3a9e3273b8222cc2cc5c153bfb70fdba521a (patch)
treed49b5984451c66d6965d494255ead626a1ba52e1 /src/SMAPI
parent359e1df431fa160993f0640b3458a95a8ee831d7 (diff)
downloadSMAPI-1bea3a9e3273b8222cc2cc5c153bfb70fdba521a.tar.gz
SMAPI-1bea3a9e3273b8222cc2cc5c153bfb70fdba521a.tar.bz2
SMAPI-1bea3a9e3273b8222cc2cc5c153bfb70fdba521a.zip
let SemanticVersion be constructed from a System.Version (#375)
Diffstat (limited to 'src/SMAPI')
-rw-r--r--src/SMAPI/SemanticVersion.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/SMAPI/SemanticVersion.cs b/src/SMAPI/SemanticVersion.cs
index ce86dceb..4826c947 100644
--- a/src/SMAPI/SemanticVersion.cs
+++ b/src/SMAPI/SemanticVersion.cs
@@ -49,6 +49,12 @@ namespace StardewModdingAPI
public SemanticVersion(string version)
: this(new SemanticVersionImpl(version)) { }
+ /// <summary>Construct an instance.</summary>
+ /// <param name="version">The assembly version.</param>
+ /// <exception cref="ArgumentNullException">The <paramref name="version"/> is null.</exception>
+ public SemanticVersion(Version version)
+ : this(new SemanticVersionImpl(version)) { }
+
/// <summary>Get an integer indicating whether this version precedes (less than 0), supercedes (more than 0), or is equivalent to (0) the specified version.</summary>
/// <param name="other">The version to compare with this instance.</param>
/// <exception cref="ArgumentNullException">The <paramref name="other"/> value is null.</exception>