diff options
| author | Rob Mensching <rob@firegiant.com> | 2019-05-08 13:35:21 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2019-05-08 13:44:59 -0700 |
| commit | ef6485ac4a03333701d343c1e3a52d25805c58f1 (patch) | |
| tree | 3093b1410e651a90c3776b42090bb4e62e98c514 /src/WixToolset.Data/Tuples/MsiServiceConfigTuple.cs | |
| parent | 6e7a3274a1710a734e5369d0a1703b9c9ac9345b (diff) | |
| download | wix-ef6485ac4a03333701d343c1e3a52d25805c58f1.tar.gz wix-ef6485ac4a03333701d343c1e3a52d25805c58f1.tar.bz2 wix-ef6485ac4a03333701d343c1e3a52d25805c58f1.zip | |
Add additional strongly typed tuples
Diffstat (limited to 'src/WixToolset.Data/Tuples/MsiServiceConfigTuple.cs')
| -rw-r--r-- | src/WixToolset.Data/Tuples/MsiServiceConfigTuple.cs | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/src/WixToolset.Data/Tuples/MsiServiceConfigTuple.cs b/src/WixToolset.Data/Tuples/MsiServiceConfigTuple.cs index 701d85b4..c0e8e459 100644 --- a/src/WixToolset.Data/Tuples/MsiServiceConfigTuple.cs +++ b/src/WixToolset.Data/Tuples/MsiServiceConfigTuple.cs | |||
| @@ -10,9 +10,10 @@ namespace WixToolset.Data | |||
| 10 | TupleDefinitionType.MsiServiceConfig, | 10 | TupleDefinitionType.MsiServiceConfig, |
| 11 | new[] | 11 | new[] |
| 12 | { | 12 | { |
| 13 | new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.MsiServiceConfig), IntermediateFieldType.String), | ||
| 14 | new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.Name), IntermediateFieldType.String), | 13 | new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.Name), IntermediateFieldType.String), |
| 15 | new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.Event), IntermediateFieldType.Number), | 14 | new IntermediateFieldDefinition(nameof(MsiServiceConfigFailureActionsTupleFields.OnInstall), IntermediateFieldType.Bool), |
| 15 | new IntermediateFieldDefinition(nameof(MsiServiceConfigFailureActionsTupleFields.OnReinstall), IntermediateFieldType.Bool), | ||
| 16 | new IntermediateFieldDefinition(nameof(MsiServiceConfigFailureActionsTupleFields.OnUninstall), IntermediateFieldType.Bool), | ||
| 16 | new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.ConfigType), IntermediateFieldType.Number), | 17 | new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.ConfigType), IntermediateFieldType.Number), |
| 17 | new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.Argument), IntermediateFieldType.String), | 18 | new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.Argument), IntermediateFieldType.String), |
| 18 | new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.Component_), IntermediateFieldType.String), | 19 | new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.Component_), IntermediateFieldType.String), |
| @@ -27,12 +28,23 @@ namespace WixToolset.Data.Tuples | |||
| 27 | { | 28 | { |
| 28 | MsiServiceConfig, | 29 | MsiServiceConfig, |
| 29 | Name, | 30 | Name, |
| 30 | Event, | 31 | OnInstall, |
| 32 | OnReinstall, | ||
| 33 | OnUninstall, | ||
| 31 | ConfigType, | 34 | ConfigType, |
| 32 | Argument, | 35 | Argument, |
| 33 | Component_, | 36 | Component_, |
| 34 | } | 37 | } |
| 35 | 38 | ||
| 39 | public enum MsiServiceConfigType | ||
| 40 | { | ||
| 41 | DelayedAutoStart = 3, | ||
| 42 | FailureActionsFlag, | ||
| 43 | ServiceSidInfo, | ||
| 44 | RequiredPrivilegesInfo, | ||
| 45 | PreshutdownInfo, | ||
| 46 | } | ||
| 47 | |||
| 36 | public class MsiServiceConfigTuple : IntermediateTuple | 48 | public class MsiServiceConfigTuple : IntermediateTuple |
| 37 | { | 49 | { |
| 38 | public MsiServiceConfigTuple() : base(TupleDefinitions.MsiServiceConfig, null, null) | 50 | public MsiServiceConfigTuple() : base(TupleDefinitions.MsiServiceConfig, null, null) |
| @@ -45,28 +57,34 @@ namespace WixToolset.Data.Tuples | |||
| 45 | 57 | ||
| 46 | public IntermediateField this[MsiServiceConfigTupleFields index] => this.Fields[(int)index]; | 58 | public IntermediateField this[MsiServiceConfigTupleFields index] => this.Fields[(int)index]; |
| 47 | 59 | ||
| 48 | public string MsiServiceConfig | ||
| 49 | { | ||
| 50 | get => (string)this.Fields[(int)MsiServiceConfigTupleFields.MsiServiceConfig]?.Value; | ||
| 51 | set => this.Set((int)MsiServiceConfigTupleFields.MsiServiceConfig, value); | ||
| 52 | } | ||
| 53 | |||
| 54 | public string Name | 60 | public string Name |
| 55 | { | 61 | { |
| 56 | get => (string)this.Fields[(int)MsiServiceConfigTupleFields.Name]?.Value; | 62 | get => (string)this.Fields[(int)MsiServiceConfigTupleFields.Name]?.Value; |
| 57 | set => this.Set((int)MsiServiceConfigTupleFields.Name, value); | 63 | set => this.Set((int)MsiServiceConfigTupleFields.Name, value); |
| 58 | } | 64 | } |
| 59 | 65 | ||
| 60 | public int Event | 66 | public bool OnInstall |
| 67 | { | ||
| 68 | get => this.Fields[(int)MsiServiceConfigTupleFields.OnInstall].AsBool(); | ||
| 69 | set => this.Set((int)MsiServiceConfigTupleFields.OnInstall, value); | ||
| 70 | } | ||
| 71 | |||
| 72 | public bool OnReinstall | ||
| 73 | { | ||
| 74 | get => this.Fields[(int)MsiServiceConfigTupleFields.OnReinstall].AsBool(); | ||
| 75 | set => this.Set((int)MsiServiceConfigTupleFields.OnReinstall, value); | ||
| 76 | } | ||
| 77 | |||
| 78 | public bool OnUninstall | ||
| 61 | { | 79 | { |
| 62 | get => (int)this.Fields[(int)MsiServiceConfigTupleFields.Event]?.Value; | 80 | get => this.Fields[(int)MsiServiceConfigTupleFields.OnUninstall].AsBool(); |
| 63 | set => this.Set((int)MsiServiceConfigTupleFields.Event, value); | 81 | set => this.Set((int)MsiServiceConfigTupleFields.OnUninstall, value); |
| 64 | } | 82 | } |
| 65 | 83 | ||
| 66 | public int ConfigType | 84 | public MsiServiceConfigType ConfigType |
| 67 | { | 85 | { |
| 68 | get => (int)this.Fields[(int)MsiServiceConfigTupleFields.ConfigType]?.Value; | 86 | get => (MsiServiceConfigType)this.Fields[(int)MsiServiceConfigTupleFields.ConfigType].AsNumber(); |
| 69 | set => this.Set((int)MsiServiceConfigTupleFields.ConfigType, value); | 87 | set => this.Set((int)MsiServiceConfigTupleFields.ConfigType, (int)value); |
| 70 | } | 88 | } |
| 71 | 89 | ||
| 72 | public string Argument | 90 | public string Argument |
