From 4edebcf64d4646acd89ba9c1d66597f91002e4e2 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 12 May 2019 15:50:04 -0700 Subject: Section ids are optional --- src/WixToolset.Data/IntermediateSection.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/WixToolset.Data/IntermediateSection.cs b/src/WixToolset.Data/IntermediateSection.cs index 54758136..b46d20ba 100644 --- a/src/WixToolset.Data/IntermediateSection.cs +++ b/src/WixToolset.Data/IntermediateSection.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 { @@ -67,14 +67,9 @@ namespace WixToolset.Data var id = jsonObject.GetValueOrDefault("id"); var type = jsonObject.GetEnumOrDefault("type", SectionType.Unknown); - if (null == id && (SectionType.Unknown != type && SectionType.Fragment != type)) - { - throw new ArgumentException("JSON object is not a valid section"); - } - if (SectionType.Unknown == type) { - throw new ArgumentException("JSON object is not a valid section", nameof(type)); + throw new ArgumentException("JSON object is not a valid section, unknown section type", nameof(type)); } var section = new IntermediateSection(id, type, codepage); -- cgit v1.2.3-55-g6feb