diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-06-19 13:45:04 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-06-19 14:02:13 +1000 |
| commit | 4b3a3e60eb5f621723be7b894a7a71ae331dcf46 (patch) | |
| tree | 4df7e0364a96661a743683da220d5c2d0a79af48 /src/WixToolset.Data/Tuples/WixBundleCustomDataTuple.cs | |
| parent | 19be63b9a7c50e17386cd476c1ffd7c40ba9eaf5 (diff) | |
| download | wix-4b3a3e60eb5f621723be7b894a7a71ae331dcf46.tar.gz wix-4b3a3e60eb5f621723be7b894a7a71ae331dcf46.tar.bz2 wix-4b3a3e60eb5f621723be7b894a7a71ae331dcf46.zip | |
Add BundleCustomData tuples. Remove Unreal from CustomTable.
Diffstat (limited to 'src/WixToolset.Data/Tuples/WixBundleCustomDataTuple.cs')
| -rw-r--r-- | src/WixToolset.Data/Tuples/WixBundleCustomDataTuple.cs | 71 |
1 files changed, 71 insertions, 0 deletions
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 | } | ||
