Add BundleCustomData tuples. Remove Unreal from CustomTable.
Sean Hall committed
Jun 19, 2020 at 13:45 UTC
4b3a3e60eb5f621723be7b894a7a71ae331dcf46
5 files changed
+203
-8
src/WixToolset.Data/Tuples/TupleDefinitions.cs
+12
@@ -120,6 +120,9 @@ namespace WixToolset.Data
120
WixBundle,
121
WixBundleCatalog,
122
WixBundleContainer,
123
+ WixBundleCustomData,
124
+ WixBundleCustomDataAttribute,
125
+ WixBundleCustomDataCell,
126
WixBundleExePackage,
127
WixBundleExtension,
128
WixBundleMsiFeature,
@@ -542,6 +545,15 @@ namespace WixToolset.Data
545
case TupleDefinitionType.WixBundleContainer:
546
return TupleDefinitions.WixBundleContainer;
547
548
+ case TupleDefinitionType.WixBundleCustomData:
549
+ return TupleDefinitions.WixBundleCustomData;
550
+
551
+ case TupleDefinitionType.WixBundleCustomDataAttribute:
552
+ return TupleDefinitions.WixBundleCustomDataAttribute;
553
+
554
+ case TupleDefinitionType.WixBundleCustomDataCell:
555
+ return TupleDefinitions.WixBundleCustomDataCell;
556
+
557
case TupleDefinitionType.WixBundleExtension:
558
return TupleDefinitions.WixBundleExtension;
559
src/WixToolset.Data/Tuples/WixBundleCustomDataAttributeTuple.cs
new
+52
@@ -0,0 +1,52 @@
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 WixToolset.Data.Tuples;
6
+
7
+ public static partial class TupleDefinitions
8
+ {
9
+ public static readonly IntermediateTupleDefinition WixBundleCustomDataAttribute = new IntermediateTupleDefinition(
10
+ TupleDefinitionType.WixBundleCustomDataAttribute,
11
+ new[]
12
+ {
13
+ new IntermediateFieldDefinition(nameof(WixBundleCustomDataAttributeTupleFields.CustomDataRef), IntermediateFieldType.String),
14
+ new IntermediateFieldDefinition(nameof(WixBundleCustomDataAttributeTupleFields.Name), IntermediateFieldType.String),
15
+ },
16
+ typeof(WixBundleCustomDataAttributeTuple));
17
+ }
18
+}
19
+
20
+namespace WixToolset.Data.Tuples
21
+{
22
+ public enum WixBundleCustomDataAttributeTupleFields
23
+ {
24
+ CustomDataRef,
25
+ Name,
26
+ }
27
+
28
+ public class WixBundleCustomDataAttributeTuple : IntermediateTuple
29
+ {
30
+ public WixBundleCustomDataAttributeTuple() : base(TupleDefinitions.WixBundleCustomDataAttribute, null, null)
31
+ {
32
+ }
33
+
34
+ public WixBundleCustomDataAttributeTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleCustomDataAttribute, sourceLineNumber, id)
35
+ {
36
+ }
37
+
38
+ public IntermediateField this[WixBundleCustomDataAttributeTupleFields index] => this.Fields[(int)index];
39
+
40
+ public string CustomDataRef
41
+ {
42
+ get => (string)this.Fields[(int)WixBundleCustomDataAttributeTupleFields.CustomDataRef];
43
+ set => this.Set((int)WixBundleCustomDataAttributeTupleFields.CustomDataRef, value);
44
+ }
45
+
46
+ public string Name
47
+ {
48
+ get => (string)this.Fields[(int)WixBundleCustomDataAttributeTupleFields.Name];
49
+ set => this.Set((int)WixBundleCustomDataAttributeTupleFields.Name, value);
50
+ }
51
+ }
52
+}
src/WixToolset.Data/Tuples/WixBundleCustomDataCellTuple.cs
new
+68
@@ -0,0 +1,68 @@
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 WixToolset.Data.Tuples;
6
+
7
+ public static partial class TupleDefinitions
8
+ {
9
+ public static readonly IntermediateTupleDefinition WixBundleCustomDataCell = new IntermediateTupleDefinition(
10
+ TupleDefinitionType.WixBundleCustomDataCell,
11
+ new[]
12
+ {
13
+ new IntermediateFieldDefinition(nameof(WixBundleCustomDataCellTupleFields.CustomDataRef), IntermediateFieldType.String),
14
+ new IntermediateFieldDefinition(nameof(WixBundleCustomDataCellTupleFields.AttributeRef), IntermediateFieldType.String),
15
+ new IntermediateFieldDefinition(nameof(WixBundleCustomDataCellTupleFields.ElementId), IntermediateFieldType.String),
16
+ new IntermediateFieldDefinition(nameof(WixBundleCustomDataCellTupleFields.Value), IntermediateFieldType.String),
17
+ },
18
+ typeof(WixBundleCustomDataCellTuple));
19
+ }
20
+}
21
+
22
+namespace WixToolset.Data.Tuples
23
+{
24
+ public enum WixBundleCustomDataCellTupleFields
25
+ {
26
+ CustomDataRef,
27
+ AttributeRef,
28
+ ElementId,
29
+ Value,
30
+ }
31
+
32
+ public class WixBundleCustomDataCellTuple : IntermediateTuple
33
+ {
34
+ public WixBundleCustomDataCellTuple() : base(TupleDefinitions.WixBundleCustomDataCell, null, null)
35
+ {
36
+ }
37
+
38
+ public WixBundleCustomDataCellTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleCustomDataCell, sourceLineNumber, id)
39
+ {
40
+ }
41
+
42
+ public IntermediateField this[WixBundleCustomDataCellTupleFields index] => this.Fields[(int)index];
43
+
44
+ public string CustomDataRef
45
+ {
46
+ get => (string)this.Fields[(int)WixBundleCustomDataCellTupleFields.CustomDataRef];
47
+ set => this.Set((int)WixBundleCustomDataCellTupleFields.CustomDataRef, value);
48
+ }
49
+
50
+ public string AttributeRef
51
+ {
52
+ get => (string)this.Fields[(int)WixBundleCustomDataCellTupleFields.AttributeRef];
53
+ set => this.Set((int)WixBundleCustomDataCellTupleFields.AttributeRef, value);
54
+ }
55
+
56
+ public string ElementId
57
+ {
58
+ get => (string)this.Fields[(int)WixBundleCustomDataCellTupleFields.ElementId];
59
+ set => this.Set((int)WixBundleCustomDataCellTupleFields.ElementId, value);
60
+ }
61
+
62
+ public string Value
63
+ {
64
+ get => (string)this.Fields[(int)WixBundleCustomDataCellTupleFields.Value];
65
+ set => this.Set((int)WixBundleCustomDataCellTupleFields.Value, value);
66
+ }
67
+ }
68
+}
src/WixToolset.Data/Tuples/WixBundleCustomDataTuple.cs
new
+71
@@ -0,0 +1,71 @@
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 WixToolset.Data.Tuples;
6
+
7
+ public static partial class TupleDefinitions
8
+ {
9
+ public static readonly IntermediateTupleDefinition WixBundleCustomData = new IntermediateTupleDefinition(
10
+ TupleDefinitionType.WixBundleCustomData,
11
+ new[]
12
+ {
13
+ new IntermediateFieldDefinition(nameof(WixBundleCustomDataTupleFields.AttributeNames), IntermediateFieldType.String),
14
+ new IntermediateFieldDefinition(nameof(WixBundleCustomDataTupleFields.Type), IntermediateFieldType.Number),
15
+ new IntermediateFieldDefinition(nameof(WixBundleCustomDataTupleFields.BundleExtensionRef), IntermediateFieldType.String),
16
+ },
17
+ typeof(WixBundleCustomDataTuple));
18
+ }
19
+}
20
+
21
+namespace WixToolset.Data.Tuples
22
+{
23
+ public enum WixBundleCustomDataTupleFields
24
+ {
25
+ AttributeNames,
26
+ Type,
27
+ BundleExtensionRef,
28
+ }
29
+
30
+ public enum WixBundleCustomDataType
31
+ {
32
+ Unknown,
33
+ BootstrapperApplication,
34
+ BundleExtension,
35
+ }
36
+
37
+ public class WixBundleCustomDataTuple : IntermediateTuple
38
+ {
39
+ public const char AttributeNamesSeparator = '\x85';
40
+
41
+ public WixBundleCustomDataTuple() : base(TupleDefinitions.WixBundleCustomData, null, null)
42
+ {
43
+ }
44
+
45
+ public WixBundleCustomDataTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleCustomData, sourceLineNumber, id)
46
+ {
47
+ }
48
+
49
+ public IntermediateField this[WixBundleCustomDataTupleFields index] => this.Fields[(int)index];
50
+
51
+ public string AttributeNames
52
+ {
53
+ get => (string)this.Fields[(int)WixBundleCustomDataTupleFields.AttributeNames];
54
+ set => this.Set((int)WixBundleCustomDataTupleFields.AttributeNames, value);
55
+ }
56
+
57
+ public WixBundleCustomDataType Type
58
+ {
59
+ get => (WixBundleCustomDataType)this.Fields[(int)WixBundleCustomDataTupleFields.Type].AsNumber();
60
+ set => this.Set((int)WixBundleCustomDataTupleFields.Type, (int)value);
61
+ }
62
+
63
+ public string BundleExtensionRef
64
+ {
65
+ get => (string)this.Fields[(int)WixBundleCustomDataTupleFields.BundleExtensionRef];
66
+ set => this.Set((int)WixBundleCustomDataTupleFields.BundleExtensionRef, value);
67
+ }
68
+
69
+ public string[] AttributeNamesSeparated => this.AttributeNames.Split(AttributeNamesSeparator);
70
+ }
71
+}
src/WixToolset.Data/Tuples/WixCustomTableTuple.cs
-8
@@ -11,7 +11,6 @@ namespace WixToolset.Data
11
new[]
12
{
13
new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnNames), IntermediateFieldType.String),
14
- new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Unreal), IntermediateFieldType.Bool),
14
},
15
typeof(WixCustomTableTuple));
16
}
@@ -22,7 +21,6 @@ namespace WixToolset.Data.Tuples
21
public enum WixCustomTableTupleFields
22
{
23
ColumnNames,
25
- Unreal,
24
}
25
26
public class WixCustomTableTuple : IntermediateTuple
@@ -45,12 +43,6 @@ namespace WixToolset.Data.Tuples
43
set => this.Set((int)WixCustomTableTupleFields.ColumnNames, value);
44
}
45
48
- public bool Unreal
49
- {
50
- get => (bool)this.Fields[(int)WixCustomTableTupleFields.Unreal];
51
- set => this.Set((int)WixCustomTableTupleFields.Unreal, value);
52
- }
53
-
46
public string[] ColumnNamesSeparated => this.ColumnNames.Split(ColumnNamesSeparator);
47
}
48
}