diff options
Diffstat (limited to 'src/WixToolset.Data/Tuples/ModuleConfigurationTuple.cs')
| -rw-r--r-- | src/WixToolset.Data/Tuples/ModuleConfigurationTuple.cs | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/ModuleConfigurationTuple.cs b/src/WixToolset.Data/Tuples/ModuleConfigurationTuple.cs new file mode 100644 index 00000000..b3c4cd7f --- /dev/null +++ b/src/WixToolset.Data/Tuples/ModuleConfigurationTuple.cs | |||
| @@ -0,0 +1,116 @@ | |||
| 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 ModuleConfiguration = new IntermediateTupleDefinition( | ||
| 10 | TupleDefinitionType.ModuleConfiguration, | ||
| 11 | new[] | ||
| 12 | { | ||
| 13 | new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.Name), IntermediateFieldType.String), | ||
| 14 | new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.Format), IntermediateFieldType.Number), | ||
| 15 | new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.Type), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.ContextData), IntermediateFieldType.String), | ||
| 17 | new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.DefaultValue), IntermediateFieldType.String), | ||
| 18 | new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.Attributes), IntermediateFieldType.Number), | ||
| 19 | new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.DisplayName), IntermediateFieldType.String), | ||
| 20 | new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.Description), IntermediateFieldType.String), | ||
| 21 | new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.HelpLocation), IntermediateFieldType.String), | ||
| 22 | new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.HelpKeyword), IntermediateFieldType.String), | ||
| 23 | }, | ||
| 24 | typeof(ModuleConfigurationTuple)); | ||
| 25 | } | ||
| 26 | } | ||
| 27 | |||
| 28 | namespace WixToolset.Data.Tuples | ||
| 29 | { | ||
| 30 | public enum ModuleConfigurationTupleFields | ||
| 31 | { | ||
| 32 | Name, | ||
| 33 | Format, | ||
| 34 | Type, | ||
| 35 | ContextData, | ||
| 36 | DefaultValue, | ||
| 37 | Attributes, | ||
| 38 | DisplayName, | ||
| 39 | Description, | ||
| 40 | HelpLocation, | ||
| 41 | HelpKeyword, | ||
| 42 | } | ||
| 43 | |||
| 44 | public class ModuleConfigurationTuple : IntermediateTuple | ||
| 45 | { | ||
| 46 | public ModuleConfigurationTuple() : base(TupleDefinitions.ModuleConfiguration, null, null) | ||
| 47 | { | ||
| 48 | } | ||
| 49 | |||
| 50 | public ModuleConfigurationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ModuleConfiguration, sourceLineNumber, id) | ||
| 51 | { | ||
| 52 | } | ||
| 53 | |||
| 54 | public IntermediateField this[ModuleConfigurationTupleFields index] => this.Fields[(int)index]; | ||
| 55 | |||
| 56 | public string Name | ||
| 57 | { | ||
| 58 | get => (string)this.Fields[(int)ModuleConfigurationTupleFields.Name]?.Value; | ||
| 59 | set => this.Set((int)ModuleConfigurationTupleFields.Name, value); | ||
| 60 | } | ||
| 61 | |||
| 62 | public int Format | ||
| 63 | { | ||
| 64 | get => (int)this.Fields[(int)ModuleConfigurationTupleFields.Format]?.Value; | ||
| 65 | set => this.Set((int)ModuleConfigurationTupleFields.Format, value); | ||
| 66 | } | ||
| 67 | |||
| 68 | public string Type | ||
| 69 | { | ||
| 70 | get => (string)this.Fields[(int)ModuleConfigurationTupleFields.Type]?.Value; | ||
| 71 | set => this.Set((int)ModuleConfigurationTupleFields.Type, value); | ||
| 72 | } | ||
| 73 | |||
| 74 | public string ContextData | ||
| 75 | { | ||
| 76 | get => (string)this.Fields[(int)ModuleConfigurationTupleFields.ContextData]?.Value; | ||
| 77 | set => this.Set((int)ModuleConfigurationTupleFields.ContextData, value); | ||
| 78 | } | ||
| 79 | |||
| 80 | public string DefaultValue | ||
| 81 | { | ||
| 82 | get => (string)this.Fields[(int)ModuleConfigurationTupleFields.DefaultValue]?.Value; | ||
| 83 | set => this.Set((int)ModuleConfigurationTupleFields.DefaultValue, value); | ||
| 84 | } | ||
| 85 | |||
| 86 | public int Attributes | ||
| 87 | { | ||
| 88 | get => (int)this.Fields[(int)ModuleConfigurationTupleFields.Attributes]?.Value; | ||
| 89 | set => this.Set((int)ModuleConfigurationTupleFields.Attributes, value); | ||
| 90 | } | ||
| 91 | |||
| 92 | public string DisplayName | ||
| 93 | { | ||
| 94 | get => (string)this.Fields[(int)ModuleConfigurationTupleFields.DisplayName]?.Value; | ||
| 95 | set => this.Set((int)ModuleConfigurationTupleFields.DisplayName, value); | ||
| 96 | } | ||
| 97 | |||
| 98 | public string Description | ||
| 99 | { | ||
| 100 | get => (string)this.Fields[(int)ModuleConfigurationTupleFields.Description]?.Value; | ||
| 101 | set => this.Set((int)ModuleConfigurationTupleFields.Description, value); | ||
| 102 | } | ||
| 103 | |||
| 104 | public string HelpLocation | ||
| 105 | { | ||
| 106 | get => (string)this.Fields[(int)ModuleConfigurationTupleFields.HelpLocation]?.Value; | ||
| 107 | set => this.Set((int)ModuleConfigurationTupleFields.HelpLocation, value); | ||
| 108 | } | ||
| 109 | |||
| 110 | public string HelpKeyword | ||
| 111 | { | ||
| 112 | get => (string)this.Fields[(int)ModuleConfigurationTupleFields.HelpKeyword]?.Value; | ||
| 113 | set => this.Set((int)ModuleConfigurationTupleFields.HelpKeyword, value); | ||
| 114 | } | ||
| 115 | } | ||
| 116 | } \ No newline at end of file | ||
