aboutsummaryrefslogtreecommitdiff
path: root/src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtilVersionReleaseLabel.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2024-03-06 14:48:10 -0800
committerRob Mensching <rob@firegiant.com>2024-03-07 10:55:57 -0800
commit3d2d46f62fc01e2653d0251ad9703090574e7c41 (patch)
treeffdf7dce6c646f38b5e3ad8325c2ce78ca891a1a /src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtilVersionReleaseLabel.cs
parenta8504dc4eb1c2d09965b0858699ac737336ef3c1 (diff)
downloadwix-3d2d46f62fc01e2653d0251ad9703090574e7c41.tar.gz
wix-3d2d46f62fc01e2653d0251ad9703090574e7c41.tar.bz2
wix-3d2d46f62fc01e2653d0251ad9703090574e7c41.zip
Better .nupkg names
Diffstat (limited to 'src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtilVersionReleaseLabel.cs')
-rw-r--r--src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtilVersionReleaseLabel.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtilVersionReleaseLabel.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtilVersionReleaseLabel.cs
new file mode 100644
index 00000000..03603714
--- /dev/null
+++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/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
3namespace WixToolset.BootstrapperApplicationApi
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}