diff options
Diffstat (limited to 'src/WixToolset.Data/Tuples/FeatureTuple.cs')
-rw-r--r-- | src/WixToolset.Data/Tuples/FeatureTuple.cs | 55 |
1 files changed, 42 insertions, 13 deletions
diff --git a/src/WixToolset.Data/Tuples/FeatureTuple.cs b/src/WixToolset.Data/Tuples/FeatureTuple.cs index a04c339b..c3b0e67a 100644 --- a/src/WixToolset.Data/Tuples/FeatureTuple.cs +++ b/src/WixToolset.Data/Tuples/FeatureTuple.cs | |||
@@ -10,14 +10,16 @@ namespace WixToolset.Data | |||
10 | TupleDefinitionType.Feature, | 10 | TupleDefinitionType.Feature, |
11 | new[] | 11 | new[] |
12 | { | 12 | { |
13 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Feature), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Feature_Parent), IntermediateFieldType.String), | 13 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Feature_Parent), IntermediateFieldType.String), |
15 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Title), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Title), IntermediateFieldType.String), |
16 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Description), IntermediateFieldType.String), | 15 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Description), IntermediateFieldType.String), |
17 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Display), IntermediateFieldType.Number), | 16 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Display), IntermediateFieldType.Number), |
18 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Level), IntermediateFieldType.Number), | 17 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Level), IntermediateFieldType.Number), |
19 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Directory_), IntermediateFieldType.String), | 18 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Directory_), IntermediateFieldType.String), |
20 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.Attributes), IntermediateFieldType.Number), | 19 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.DisallowAbsent), IntermediateFieldType.Bool), |
20 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.DisallowAdvertise), IntermediateFieldType.Bool), | ||
21 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.InstallDefault), IntermediateFieldType.Number), | ||
22 | new IntermediateFieldDefinition(nameof(FeatureTupleFields.TypicalDefault), IntermediateFieldType.Number), | ||
21 | }, | 23 | }, |
22 | typeof(FeatureTuple)); | 24 | typeof(FeatureTuple)); |
23 | } | 25 | } |
@@ -27,14 +29,29 @@ namespace WixToolset.Data.Tuples | |||
27 | { | 29 | { |
28 | public enum FeatureTupleFields | 30 | public enum FeatureTupleFields |
29 | { | 31 | { |
30 | Feature, | ||
31 | Feature_Parent, | 32 | Feature_Parent, |
32 | Title, | 33 | Title, |
33 | Description, | 34 | Description, |
34 | Display, | 35 | Display, |
35 | Level, | 36 | Level, |
36 | Directory_, | 37 | Directory_, |
37 | Attributes, | 38 | DisallowAbsent, |
39 | DisallowAdvertise, | ||
40 | InstallDefault, | ||
41 | TypicalDefault, | ||
42 | } | ||
43 | |||
44 | public enum FeatureInstallDefault | ||
45 | { | ||
46 | Local, | ||
47 | Source, | ||
48 | FollowParent, | ||
49 | } | ||
50 | |||
51 | public enum FeatureTypicalDefault | ||
52 | { | ||
53 | Install, | ||
54 | Advertise | ||
38 | } | 55 | } |
39 | 56 | ||
40 | public class FeatureTuple : IntermediateTuple | 57 | public class FeatureTuple : IntermediateTuple |
@@ -49,12 +66,6 @@ namespace WixToolset.Data.Tuples | |||
49 | 66 | ||
50 | public IntermediateField this[FeatureTupleFields index] => this.Fields[(int)index]; | 67 | public IntermediateField this[FeatureTupleFields index] => this.Fields[(int)index]; |
51 | 68 | ||
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 | 69 | public string Feature_Parent |
59 | { | 70 | { |
60 | get => (string)this.Fields[(int)FeatureTupleFields.Feature_Parent]?.Value; | 71 | get => (string)this.Fields[(int)FeatureTupleFields.Feature_Parent]?.Value; |
@@ -91,10 +102,28 @@ namespace WixToolset.Data.Tuples | |||
91 | set => this.Set((int)FeatureTupleFields.Directory_, value); | 102 | set => this.Set((int)FeatureTupleFields.Directory_, value); |
92 | } | 103 | } |
93 | 104 | ||
94 | public int Attributes | 105 | public bool DisallowAbsent |
106 | { | ||
107 | get => this.Fields[(int)FeatureTupleFields.DisallowAbsent].AsBool(); | ||
108 | set => this.Set((int)FeatureTupleFields.DisallowAbsent, value); | ||
109 | } | ||
110 | |||
111 | public bool DisallowAdvertise | ||
112 | { | ||
113 | get => this.Fields[(int)FeatureTupleFields.DisallowAdvertise].AsBool(); | ||
114 | set => this.Set((int)FeatureTupleFields.DisallowAdvertise, value); | ||
115 | } | ||
116 | |||
117 | public FeatureInstallDefault InstallDefault | ||
118 | { | ||
119 | get => (FeatureInstallDefault)this.Fields[(int)FeatureTupleFields.InstallDefault].AsNumber(); | ||
120 | set => this.Set((int)FeatureTupleFields.InstallDefault, (int)value); | ||
121 | } | ||
122 | |||
123 | public FeatureTypicalDefault TypicalDefault | ||
95 | { | 124 | { |
96 | get => (int)this.Fields[(int)FeatureTupleFields.Attributes]?.Value; | 125 | get => (FeatureTypicalDefault)this.Fields[(int)FeatureTupleFields.TypicalDefault].AsNumber(); |
97 | set => this.Set((int)FeatureTupleFields.Attributes, value); | 126 | set => this.Set((int)FeatureTupleFields.TypicalDefault, (int)value); |
98 | } | 127 | } |
99 | } | 128 | } |
100 | } \ No newline at end of file | 129 | } \ No newline at end of file |