diff options
Diffstat (limited to 'src/WixToolset.Mba.Core/VerUtil.cs')
-rw-r--r-- | src/WixToolset.Mba.Core/VerUtil.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/WixToolset.Mba.Core/VerUtil.cs b/src/WixToolset.Mba.Core/VerUtil.cs index dcc9dee2..81c5b716 100644 --- a/src/WixToolset.Mba.Core/VerUtil.cs +++ b/src/WixToolset.Mba.Core/VerUtil.cs | |||
@@ -6,6 +6,9 @@ namespace WixToolset.Mba.Core | |||
6 | using System.Runtime.InteropServices; | 6 | using System.Runtime.InteropServices; |
7 | using System.Text; | 7 | using System.Text; |
8 | 8 | ||
9 | /// <summary> | ||
10 | /// Managed wrapper for verutil. | ||
11 | /// </summary> | ||
9 | public static class VerUtil | 12 | public static class VerUtil |
10 | { | 13 | { |
11 | [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] | 14 | [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] |
@@ -105,18 +108,34 @@ namespace WixToolset.Mba.Core | |||
105 | return VerCompareStringVersions(version1, version2, strict); | 108 | return VerCompareStringVersions(version1, version2, strict); |
106 | } | 109 | } |
107 | 110 | ||
111 | /// <summary> | ||
112 | /// | ||
113 | /// </summary> | ||
114 | /// <param name="version"></param> | ||
115 | /// <returns></returns> | ||
108 | public static VerUtilVersion CopyVersion(VerUtilVersion version) | 116 | public static VerUtilVersion CopyVersion(VerUtilVersion version) |
109 | { | 117 | { |
110 | var handle = VerCopyVersion(version.GetHandle()); | 118 | var handle = VerCopyVersion(version.GetHandle()); |
111 | return new VerUtilVersion(handle); | 119 | return new VerUtilVersion(handle); |
112 | } | 120 | } |
113 | 121 | ||
122 | /// <summary> | ||
123 | /// | ||
124 | /// </summary> | ||
125 | /// <param name="version"></param> | ||
126 | /// <param name="strict">Whether to throw exception on invalid version.</param> | ||
127 | /// <returns></returns> | ||
114 | public static VerUtilVersion ParseVersion(string version, bool strict) | 128 | public static VerUtilVersion ParseVersion(string version, bool strict) |
115 | { | 129 | { |
116 | var handle = VerParseVersion(version, 0, strict); | 130 | var handle = VerParseVersion(version, 0, strict); |
117 | return new VerUtilVersion(handle); | 131 | return new VerUtilVersion(handle); |
118 | } | 132 | } |
119 | 133 | ||
134 | /// <summary> | ||
135 | /// | ||
136 | /// </summary> | ||
137 | /// <param name="version"></param> | ||
138 | /// <returns></returns> | ||
120 | public static VerUtilVersion VersionFromQword(long version) | 139 | public static VerUtilVersion VersionFromQword(long version) |
121 | { | 140 | { |
122 | var handle = VerVersionFromQword(version); | 141 | var handle = VerVersionFromQword(version); |