diff options
Diffstat (limited to 'src')
5 files changed, 203 insertions, 8 deletions
diff --git a/src/WixToolset.Data/Tuples/TupleDefinitions.cs b/src/WixToolset.Data/Tuples/TupleDefinitions.cs index a91b3f8f..10776b67 100644 --- a/src/WixToolset.Data/Tuples/TupleDefinitions.cs +++ b/src/WixToolset.Data/Tuples/TupleDefinitions.cs | |||
@@ -120,6 +120,9 @@ namespace WixToolset.Data | |||
120 | WixBundle, | 120 | WixBundle, |
121 | WixBundleCatalog, | 121 | WixBundleCatalog, |
122 | WixBundleContainer, | 122 | WixBundleContainer, |
123 | WixBundleCustomData, | ||
124 | WixBundleCustomDataAttribute, | ||
125 | WixBundleCustomDataCell, | ||
123 | WixBundleExePackage, | 126 | WixBundleExePackage, |
124 | WixBundleExtension, | 127 | WixBundleExtension, |
125 | WixBundleMsiFeature, | 128 | WixBundleMsiFeature, |
@@ -542,6 +545,15 @@ namespace WixToolset.Data | |||
542 | case TupleDefinitionType.WixBundleContainer: | 545 | case TupleDefinitionType.WixBundleContainer: |
543 | return TupleDefinitions.WixBundleContainer; | 546 | return TupleDefinitions.WixBundleContainer; |
544 | 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 | |||
545 | case TupleDefinitionType.WixBundleExtension: | 557 | case TupleDefinitionType.WixBundleExtension: |
546 | return TupleDefinitions.WixBundleExtension; | 558 | return TupleDefinitions.WixBundleExtension; |
547 | 559 | ||
diff --git a/src/WixToolset.Data/Tuples/WixBundleCustomDataAttributeTuple.cs b/src/WixToolset.Data/Tuples/WixBundleCustomDataAttributeTuple.cs new file mode 100644 index 00000000..9c27c9f4 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleCustomDataAttributeTuple.cs | |||
@@ -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 | } | ||
diff --git a/src/WixToolset.Data/Tuples/WixBundleCustomDataCellTuple.cs b/src/WixToolset.Data/Tuples/WixBundleCustomDataCellTuple.cs new file mode 100644 index 00000000..d488d6d0 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleCustomDataCellTuple.cs | |||
@@ -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 | } | ||
diff --git a/src/WixToolset.Data/Tuples/WixBundleCustomDataTuple.cs b/src/WixToolset.Data/Tuples/WixBundleCustomDataTuple.cs new file mode 100644 index 00000000..d0878deb --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleCustomDataTuple.cs | |||
@@ -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 | } | ||
diff --git a/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs b/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs index b0d12a63..4d668842 100644 --- a/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs +++ b/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs | |||
@@ -11,7 +11,6 @@ namespace WixToolset.Data | |||
11 | new[] | 11 | new[] |
12 | { | 12 | { |
13 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnNames), IntermediateFieldType.String), | 13 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnNames), IntermediateFieldType.String), |
14 | new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Unreal), IntermediateFieldType.Bool), | ||
15 | }, | 14 | }, |
16 | typeof(WixCustomTableTuple)); | 15 | typeof(WixCustomTableTuple)); |
17 | } | 16 | } |
@@ -22,7 +21,6 @@ namespace WixToolset.Data.Tuples | |||
22 | public enum WixCustomTableTupleFields | 21 | public enum WixCustomTableTupleFields |
23 | { | 22 | { |
24 | ColumnNames, | 23 | ColumnNames, |
25 | Unreal, | ||
26 | } | 24 | } |
27 | 25 | ||
28 | public class WixCustomTableTuple : IntermediateTuple | 26 | public class WixCustomTableTuple : IntermediateTuple |
@@ -45,12 +43,6 @@ namespace WixToolset.Data.Tuples | |||
45 | set => this.Set((int)WixCustomTableTupleFields.ColumnNames, value); | 43 | set => this.Set((int)WixCustomTableTupleFields.ColumnNames, value); |
46 | } | 44 | } |
47 | 45 | ||
48 | public bool Unreal | ||
49 | { | ||
50 | get => (bool)this.Fields[(int)WixCustomTableTupleFields.Unreal]; | ||
51 | set => this.Set((int)WixCustomTableTupleFields.Unreal, value); | ||
52 | } | ||
53 | |||
54 | public string[] ColumnNamesSeparated => this.ColumnNames.Split(ColumnNamesSeparator); | 46 | public string[] ColumnNamesSeparated => this.ColumnNames.Split(ColumnNamesSeparator); |
55 | } | 47 | } |
56 | } | 48 | } |