diff options
Diffstat (limited to 'src/api/burn/WixToolset.Mba.Core/VerUtilVersionReleaseLabel.cs')
| -rw-r--r-- | src/api/burn/WixToolset.Mba.Core/VerUtilVersionReleaseLabel.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/api/burn/WixToolset.Mba.Core/VerUtilVersionReleaseLabel.cs b/src/api/burn/WixToolset.Mba.Core/VerUtilVersionReleaseLabel.cs new file mode 100644 index 00000000..97e8190d --- /dev/null +++ b/src/api/burn/WixToolset.Mba.Core/VerUtilVersionReleaseLabel.cs | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Mba.Core | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.Runtime.InteropServices; | ||
| 7 | |||
| 8 | /// <summary> | ||
| 9 | /// A release label from a <see cref="VerUtilVersion"/>. | ||
| 10 | /// </summary> | ||
| 11 | public sealed class VerUtilVersionReleaseLabel | ||
| 12 | { | ||
| 13 | internal VerUtilVersionReleaseLabel(IntPtr pReleaseLabel, IntPtr wzVersion) | ||
| 14 | { | ||
| 15 | var releaseLabel = (VerUtil.VersionReleaseLabelStruct)Marshal.PtrToStructure(pReleaseLabel, typeof(VerUtil.VersionReleaseLabelStruct)); | ||
| 16 | this.IsNumeric = releaseLabel.fNumeric; | ||
| 17 | this.Value = releaseLabel.dwValue; | ||
| 18 | this.Label = VerUtil.VersionStringFromOffset(wzVersion, releaseLabel.cchLabelOffset, releaseLabel.cchLabel); | ||
| 19 | } | ||
| 20 | |||
| 21 | /// <summary> | ||
| 22 | /// Whether the label was parsed as a number. | ||
| 23 | /// </summary> | ||
| 24 | public bool IsNumeric { get; private set; } | ||
| 25 | |||
| 26 | /// <summary> | ||
| 27 | /// If <see cref="IsNumeric"/> then the value that was parsed. | ||
| 28 | /// </summary> | ||
| 29 | public uint Value { get; private set; } | ||
| 30 | |||
| 31 | /// <summary> | ||
| 32 | /// The string version of the label. | ||
| 33 | /// </summary> | ||
| 34 | public string Label { get; private set; } | ||
| 35 | } | ||
| 36 | } | ||
