@joebigelow / wix-1 / commits / 9d0fea2e

Improve debuggability of tuples

Rob Mensching committed May 23, 2019 at 22:34 UTC 9d0fea2e7617e4ba4fc85fbe412c812d9bc65564
1 file changed +5 -1
src/WixToolset.Data/IntermediateTuple.cs
+5 -1
@@ -1,10 +1,12 @@
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
3 namespace WixToolset.Data
4 {
5 using System;
6 + using System.Diagnostics;
7 using SimpleJson;
8
9 + [DebuggerDisplay("{DebuggerDisplay,nq}")]
10 public class IntermediateTuple
11 {
12 public IntermediateTuple(IntermediateTupleDefinition definition) : this(definition, null, null)
@@ -29,6 +31,8 @@ namespace WixToolset.Data
31
32 public IntermediateField this[int index] => this.Fields[index];
33
34 + private string DebuggerDisplay => $"{this.Definition?.Name} {this.Id?.Id}";
35 +
36 internal static IntermediateTuple Deserialize(ITupleDefinitionCreator creator, Uri baseUri, JsonObject jsonObject)
37 {
38 var definitionName = jsonObject.GetValueOrDefault<string>("type");