diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-11-01 10:56:09 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-11-01 10:56:09 -0700 |
| commit | 69b15d96cebdbb7201b1849b4f62786633d70b8d (patch) | |
| tree | 4b65de8679e4b4ab81b69edcccbac1ae9f55a16d /src/WixToolset.Data/Tuples/FeatureTuple.cs | |
| parent | a8656a87887d6cb2c54f4bbeacee37f7074f1032 (diff) | |
| download | wix-69b15d96cebdbb7201b1849b4f62786633d70b8d.tar.gz wix-69b15d96cebdbb7201b1849b4f62786633d70b8d.tar.bz2 wix-69b15d96cebdbb7201b1849b4f62786633d70b8d.zip | |
Introduce WiX Intermediate Representation
Diffstat (limited to 'src/WixToolset.Data/Tuples/FeatureTuple.cs')
| -rw-r--r-- | src/WixToolset.Data/Tuples/FeatureTuple.cs | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/FeatureTuple.cs b/src/WixToolset.Data/Tuples/FeatureTuple.cs new file mode 100644 index 00000000..a04c339b --- /dev/null +++ b/src/WixToolset.Data/Tuples/FeatureTuple.cs | |||
| @@ -0,0 +1,100 @@ | |||
| 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 Feature = new IntermediateTupleDefinition( | ||
| 10 | TupleDefinitionType.Feature, | ||
| 11 | new[] | ||
| 12 | { | ||
| 13 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Feature), IntermediateFieldType.String), | ||
| 14 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Feature_Parent), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Title), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Description), IntermediateFieldType.String), | ||
| 17 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Display), IntermediateFieldType.Number), | ||
| 18 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Level), IntermediateFieldType.Number), | ||
| 19 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Directory_), IntermediateFieldType.String), | ||
| 20 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Attributes), IntermediateFieldType.Number), | ||
| 21 | }, | ||
| 22 | typeof(FeatureTuple)); | ||
| 23 | } | ||
| 24 | } | ||
| 25 | |||
| 26 | namespace WixToolset.Data.Tuples | ||
| 27 | { | ||
| 28 | public enum FeatureTupleFields | ||
| 29 | { | ||
| 30 | Feature, | ||
| 31 | Feature_Parent, | ||
| 32 | Title, | ||
| 33 | Description, | ||
| 34 | Display, | ||
| 35 | Level, | ||
| 36 | Directory_, | ||
| 37 | Attributes, | ||
| 38 | } | ||
| 39 | |||
| 40 | public class FeatureTuple : IntermediateTuple | ||
| 41 | { | ||
| 42 | public FeatureTuple() : base(TupleDefinitions.Feature, null, null) | ||
| 43 | { | ||
| 44 | } | ||
| 45 | |||
| 46 | public FeatureTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Feature, sourceLineNumber, id) | ||
| 47 | { | ||
| 48 | } | ||
| 49 | |||
| 50 | public IntermediateField this[FeatureTupleFields index] => this.Fields[(int)index]; | ||
| 51 | |||
| 52 | public string Feature | ||
| 53 | { | ||
| 54 | get => (string)this.Fields[(int)FeatureTupleFields.Feature]?.Value; | ||
| 55 | set => this.Set((int)FeatureTupleFields.Feature, value); | ||
| 56 | } | ||
| 57 | |||
| 58 | public string Feature_Parent | ||
| 59 | { | ||
| 60 | get => (string)this.Fields[(int)FeatureTupleFields.Feature_Parent]?.Value; | ||
| 61 | set => this.Set((int)FeatureTupleFields.Feature_Parent, value); | ||
| 62 | } | ||
| 63 | |||
| 64 | public string Title | ||
| 65 | { | ||
| 66 | get => (string)this.Fields[(int)FeatureTupleFields.Title]?.Value; | ||
| 67 | set => this.Set((int)FeatureTupleFields.Title, value); | ||
| 68 | } | ||
| 69 | |||
| 70 | public string Description | ||
| 71 | { | ||
| 72 | get => (string)this.Fields[(int)FeatureTupleFields.Description]?.Value; | ||
| 73 | set => this.Set((int)FeatureTupleFields.Description, value); | ||
| 74 | } | ||
| 75 | |||
| 76 | public int Display | ||
| 77 | { | ||
| 78 | get => (int)this.Fields[(int)FeatureTupleFields.Display]?.Value; | ||
| 79 | set => this.Set((int)FeatureTupleFields.Display, value); | ||
| 80 | } | ||
| 81 | |||
| 82 | public int Level | ||
| 83 | { | ||
| 84 | get => (int)this.Fields[(int)FeatureTupleFields.Level]?.Value; | ||
| 85 | set => this.Set((int)FeatureTupleFields.Level, value); | ||
| 86 | } | ||
| 87 | |||
| 88 | public string Directory_ | ||
| 89 | { | ||
| 90 | get => (string)this.Fields[(int)FeatureTupleFields.Directory_]?.Value; | ||
| 91 | set => this.Set((int)FeatureTupleFields.Directory_, value); | ||
| 92 | } | ||
| 93 | |||
| 94 | public int Attributes | ||
| 95 | { | ||
| 96 | get => (int)this.Fields[(int)FeatureTupleFields.Attributes]?.Value; | ||
| 97 | set => this.Set((int)FeatureTupleFields.Attributes, value); | ||
| 98 | } | ||
| 99 | } | ||
| 100 | } \ No newline at end of file | ||
