From 4eb2b075b0b2a94fc3faa76271c21ac413bf4c96 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 8 May 2019 23:50:13 -0700 Subject: Support long as a number --- src/WixToolset.Data/IntermediateFieldValueExtensions.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 @@ -// 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. +// 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. namespace WixToolset.Data { @@ -26,6 +26,10 @@ namespace WixToolset.Data { return n != 0; } + else if (value.Data is long l) + { + return l != 0; + } else if (value.Data is string s) { if (s.Equals("yes", StringComparison.OrdinalIgnoreCase) || s.Equals("true", StringComparison.OrdinalIgnoreCase)) @@ -57,6 +61,10 @@ namespace WixToolset.Data { return n; } + else if (value.Data is long l) + { + return (int)l; + } else if (value.Data is bool b) { return b ? 1 : 0; @@ -88,6 +96,10 @@ namespace WixToolset.Data { return n.ToString(); } + else if (value.Data is long l) + { + return l.ToString(); + } else if (value.Data is bool b) { return b ? "true" : "false"; -- cgit v1.2.3-55-g6feb