diff options
Diffstat (limited to 'src/WixToolset.Mba.Core/VerUtilVersion.cs')
-rw-r--r-- | src/WixToolset.Mba.Core/VerUtilVersion.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/WixToolset.Mba.Core/VerUtilVersion.cs b/src/WixToolset.Mba.Core/VerUtilVersion.cs index 2b509a21..7408c26f 100644 --- a/src/WixToolset.Mba.Core/VerUtilVersion.cs +++ b/src/WixToolset.Mba.Core/VerUtilVersion.cs | |||
@@ -5,6 +5,9 @@ namespace WixToolset.Mba.Core | |||
5 | using System; | 5 | using System; |
6 | using System.Runtime.InteropServices; | 6 | using System.Runtime.InteropServices; |
7 | 7 | ||
8 | /// <summary> | ||
9 | /// An enhanced implementation of SemVer 2.0. | ||
10 | /// </summary> | ||
8 | public sealed class VerUtilVersion : IDisposable | 11 | public sealed class VerUtilVersion : IDisposable |
9 | { | 12 | { |
10 | internal VerUtilVersion(VerUtil.VersionHandle handle) | 13 | internal VerUtilVersion(VerUtil.VersionHandle handle) |
@@ -30,15 +33,48 @@ namespace WixToolset.Mba.Core | |||
30 | } | 33 | } |
31 | } | 34 | } |
32 | 35 | ||
36 | /// <summary> | ||
37 | /// String version, which would have stripped the leading 'v'. | ||
38 | /// </summary> | ||
33 | public string Version { get; private set; } | 39 | public string Version { get; private set; } |
40 | |||
41 | /// <summary> | ||
42 | /// For version A.B.C.D, Major is A. It is 0 if not specified. | ||
43 | /// </summary> | ||
34 | public uint Major { get; private set; } | 44 | public uint Major { get; private set; } |
45 | |||
46 | /// <summary> | ||
47 | /// For version A.B.C.D, Minor is B. It is 0 if not specified. | ||
48 | /// </summary> | ||
35 | public uint Minor { get; private set; } | 49 | public uint Minor { get; private set; } |
50 | |||
51 | /// <summary> | ||
52 | /// For version A.B.C.D, Patch is C. It is 0 if not specified. | ||
53 | /// </summary> | ||
36 | public uint Patch { get; private set; } | 54 | public uint Patch { get; private set; } |
55 | |||
56 | /// <summary> | ||
57 | /// For version A.B.C.D, Revision is D. It is 0 if not specified. | ||
58 | /// </summary> | ||
37 | public uint Revision { get; private set; } | 59 | public uint Revision { get; private set; } |
60 | |||
61 | /// <summary> | ||
62 | /// For version X.Y.Z-releaselabels+metadata, ReleaseLabels is the parsed information for releaselabels. | ||
63 | /// </summary> | ||
38 | public VerUtilVersionReleaseLabel[] ReleaseLabels { get; private set; } | 64 | public VerUtilVersionReleaseLabel[] ReleaseLabels { get; private set; } |
65 | |||
66 | /// <summary> | ||
67 | /// For version X.Y.Z-releaselabels+metadata, Metadata is the rest of the string after +. | ||
68 | /// For invalid versions, it is all of the string after the point where it was an invalid string. | ||
69 | /// </summary> | ||
39 | public string Metadata { get; private set; } | 70 | public string Metadata { get; private set; } |
71 | |||
72 | /// <summary> | ||
73 | /// Whether the version conformed to the spec. | ||
74 | /// </summary> | ||
40 | public bool IsInvalid { get; private set; } | 75 | public bool IsInvalid { get; private set; } |
41 | 76 | ||
77 | /// <inheritdoc/> | ||
42 | public void Dispose() | 78 | public void Dispose() |
43 | { | 79 | { |
44 | if (this.Handle != null) | 80 | if (this.Handle != null) |