aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2019-05-08 23:50:13 -0700
committerRob Mensching <rob@firegiant.com>2019-05-08 23:52:33 -0700
commit4eb2b075b0b2a94fc3faa76271c21ac413bf4c96 (patch)
tree8b16ff985663680c6f0929c6536fd3126e0018c0
parentef6485ac4a03333701d343c1e3a52d25805c58f1 (diff)
downloadwix-4eb2b075b0b2a94fc3faa76271c21ac413bf4c96.tar.gz
wix-4eb2b075b0b2a94fc3faa76271c21ac413bf4c96.tar.bz2
wix-4eb2b075b0b2a94fc3faa76271c21ac413bf4c96.zip
Support long as a number
-rw-r--r--src/WixToolset.Data/IntermediateFieldValueExtensions.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/WixToolset.Data/IntermediateFieldValueExtensions.cs b/src/WixToolset.Data/IntermediateFieldValueExtensions.cs
index 9a4237d8..25a40ee6 100644
--- a/src/WixToolset.Data/IntermediateFieldValueExtensions.cs
+++ b/src/WixToolset.Data/IntermediateFieldValueExtensions.cs
@@ -1,4 +1,4 @@
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. 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 2
3namespace WixToolset.Data 3namespace WixToolset.Data
4{ 4{
@@ -26,6 +26,10 @@ namespace WixToolset.Data
26 { 26 {
27 return n != 0; 27 return n != 0;
28 } 28 }
29 else if (value.Data is long l)
30 {
31 return l != 0;
32 }
29 else if (value.Data is string s) 33 else if (value.Data is string s)
30 { 34 {
31 if (s.Equals("yes", StringComparison.OrdinalIgnoreCase) || s.Equals("true", StringComparison.OrdinalIgnoreCase)) 35 if (s.Equals("yes", StringComparison.OrdinalIgnoreCase) || s.Equals("true", StringComparison.OrdinalIgnoreCase))
@@ -57,6 +61,10 @@ namespace WixToolset.Data
57 { 61 {
58 return n; 62 return n;
59 } 63 }
64 else if (value.Data is long l)
65 {
66 return (int)l;
67 }
60 else if (value.Data is bool b) 68 else if (value.Data is bool b)
61 { 69 {
62 return b ? 1 : 0; 70 return b ? 1 : 0;
@@ -88,6 +96,10 @@ namespace WixToolset.Data
88 { 96 {
89 return n.ToString(); 97 return n.ToString();
90 } 98 }
99 else if (value.Data is long l)
100 {
101 return l.ToString();
102 }
91 else if (value.Data is bool b) 103 else if (value.Data is bool b)
92 { 104 {
93 return b ? "true" : "false"; 105 return b ? "true" : "false";