diff options
Diffstat (limited to 'src/WixToolset.Data/Tuples/CustomActionTuple.cs')
-rw-r--r-- | src/WixToolset.Data/Tuples/CustomActionTuple.cs | 120 |
1 files changed, 102 insertions, 18 deletions
diff --git a/src/WixToolset.Data/Tuples/CustomActionTuple.cs b/src/WixToolset.Data/Tuples/CustomActionTuple.cs index a5d8fd46..9c92593a 100644 --- a/src/WixToolset.Data/Tuples/CustomActionTuple.cs +++ b/src/WixToolset.Data/Tuples/CustomActionTuple.cs | |||
@@ -10,11 +10,18 @@ namespace WixToolset.Data | |||
10 | TupleDefinitionType.CustomAction, | 10 | TupleDefinitionType.CustomAction, |
11 | new[] | 11 | new[] |
12 | { | 12 | { |
13 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.Action), IntermediateFieldType.String), | 13 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.ExecutionType), IntermediateFieldType.Number), |
14 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.Type), IntermediateFieldType.Number), | ||
15 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.Source), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.Source), IntermediateFieldType.String), |
15 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.SourceType), IntermediateFieldType.Number), | ||
16 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.Target), IntermediateFieldType.String), | 16 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.Target), IntermediateFieldType.String), |
17 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.ExtendedType), IntermediateFieldType.Number), | 17 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.TargetType), IntermediateFieldType.Number), |
18 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.Async), IntermediateFieldType.Bool), | ||
19 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.Hidden), IntermediateFieldType.Bool), | ||
20 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.IgnoreResult), IntermediateFieldType.Bool), | ||
21 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.Impersonate), IntermediateFieldType.Bool), | ||
22 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.PatchUninstall), IntermediateFieldType.Bool), | ||
23 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.TSAware), IntermediateFieldType.Bool), | ||
24 | new IntermediateFieldDefinition(nameof(CustomActionTupleFields.Win64), IntermediateFieldType.Bool), | ||
18 | }, | 25 | }, |
19 | typeof(CustomActionTuple)); | 26 | typeof(CustomActionTuple)); |
20 | } | 27 | } |
@@ -24,11 +31,46 @@ namespace WixToolset.Data.Tuples | |||
24 | { | 31 | { |
25 | public enum CustomActionTupleFields | 32 | public enum CustomActionTupleFields |
26 | { | 33 | { |
27 | Action, | 34 | ExecutionType, |
28 | Type, | ||
29 | Source, | 35 | Source, |
36 | SourceType, | ||
30 | Target, | 37 | Target, |
31 | ExtendedType, | 38 | TargetType, |
39 | Async, | ||
40 | Hidden, | ||
41 | IgnoreResult, | ||
42 | Impersonate, | ||
43 | PatchUninstall, | ||
44 | TSAware, | ||
45 | Win64, | ||
46 | } | ||
47 | |||
48 | public enum CustomActionExecutionType | ||
49 | { | ||
50 | Immediate, | ||
51 | FirstSequence = 256, | ||
52 | OncePerProcess = 512, | ||
53 | ClientRepeat = 768, | ||
54 | Deferred = 1024, | ||
55 | Rollback = 1280, | ||
56 | Commit = 1536, | ||
57 | } | ||
58 | |||
59 | public enum CustomActionSourceType | ||
60 | { | ||
61 | Binary, | ||
62 | File = 0x10, | ||
63 | Directory = 0x20, | ||
64 | Property = 0x30, | ||
65 | } | ||
66 | |||
67 | public enum CustomActionTargetType | ||
68 | { | ||
69 | Dll = 1, | ||
70 | Exe = 2, | ||
71 | TextData = 3, | ||
72 | JScript = 5, | ||
73 | VBScript = 6, | ||
32 | } | 74 | } |
33 | 75 | ||
34 | public class CustomActionTuple : IntermediateTuple | 76 | public class CustomActionTuple : IntermediateTuple |
@@ -43,16 +85,10 @@ namespace WixToolset.Data.Tuples | |||
43 | 85 | ||
44 | public IntermediateField this[CustomActionTupleFields index] => this.Fields[(int)index]; | 86 | public IntermediateField this[CustomActionTupleFields index] => this.Fields[(int)index]; |
45 | 87 | ||
46 | public string Action | 88 | public CustomActionExecutionType ExecutionType |
47 | { | 89 | { |
48 | get => (string)this.Fields[(int)CustomActionTupleFields.Action]?.Value; | 90 | get => (CustomActionExecutionType)this.Fields[(int)CustomActionTupleFields.ExecutionType].AsNumber(); |
49 | set => this.Set((int)CustomActionTupleFields.Action, value); | 91 | set => this.Set((int)CustomActionTupleFields.ExecutionType, (int)value); |
50 | } | ||
51 | |||
52 | public int Type | ||
53 | { | ||
54 | get => (int)this.Fields[(int)CustomActionTupleFields.Type]?.Value; | ||
55 | set => this.Set((int)CustomActionTupleFields.Type, value); | ||
56 | } | 92 | } |
57 | 93 | ||
58 | public string Source | 94 | public string Source |
@@ -61,16 +97,64 @@ namespace WixToolset.Data.Tuples | |||
61 | set => this.Set((int)CustomActionTupleFields.Source, value); | 97 | set => this.Set((int)CustomActionTupleFields.Source, value); |
62 | } | 98 | } |
63 | 99 | ||
100 | public CustomActionSourceType SourceType | ||
101 | { | ||
102 | get => (CustomActionSourceType)this.Fields[(int)CustomActionTupleFields.SourceType].AsNumber(); | ||
103 | set => this.Set((int)CustomActionTupleFields.SourceType, (int)value); | ||
104 | } | ||
105 | |||
64 | public string Target | 106 | public string Target |
65 | { | 107 | { |
66 | get => (string)this.Fields[(int)CustomActionTupleFields.Target]?.Value; | 108 | get => (string)this.Fields[(int)CustomActionTupleFields.Target]?.Value; |
67 | set => this.Set((int)CustomActionTupleFields.Target, value); | 109 | set => this.Set((int)CustomActionTupleFields.Target, value); |
68 | } | 110 | } |
69 | 111 | ||
70 | public int ExtendedType | 112 | public CustomActionTargetType TargetType |
113 | { | ||
114 | get => (CustomActionTargetType)this.Fields[(int)CustomActionTupleFields.TargetType].AsNumber(); | ||
115 | set => this.Set((int)CustomActionTupleFields.TargetType, (int)value); | ||
116 | } | ||
117 | |||
118 | public bool Async | ||
119 | { | ||
120 | get => this.Fields[(int)CustomActionTupleFields.Async].AsBool(); | ||
121 | set => this.Set((int)CustomActionTupleFields.Async, value); | ||
122 | } | ||
123 | |||
124 | public bool Hidden | ||
125 | { | ||
126 | get => this.Fields[(int)CustomActionTupleFields.Hidden].AsBool(); | ||
127 | set => this.Set((int)CustomActionTupleFields.Hidden, value); | ||
128 | } | ||
129 | |||
130 | public bool IgnoreResult | ||
131 | { | ||
132 | get => this.Fields[(int)CustomActionTupleFields.IgnoreResult].AsBool(); | ||
133 | set => this.Set((int)CustomActionTupleFields.IgnoreResult, value); | ||
134 | } | ||
135 | |||
136 | public bool Impersonate | ||
137 | { | ||
138 | get => this.Fields[(int)CustomActionTupleFields.Impersonate].AsBool(); | ||
139 | set => this.Set((int)CustomActionTupleFields.Impersonate, value); | ||
140 | } | ||
141 | |||
142 | public bool PatchUninstall | ||
143 | { | ||
144 | get => this.Fields[(int)CustomActionTupleFields.PatchUninstall].AsBool(); | ||
145 | set => this.Set((int)CustomActionTupleFields.PatchUninstall, value); | ||
146 | } | ||
147 | |||
148 | public bool TSAware | ||
149 | { | ||
150 | get => this.Fields[(int)CustomActionTupleFields.TSAware].AsBool(); | ||
151 | set => this.Set((int)CustomActionTupleFields.TSAware, value); | ||
152 | } | ||
153 | |||
154 | public bool Win64 | ||
71 | { | 155 | { |
72 | get => (int)this.Fields[(int)CustomActionTupleFields.ExtendedType]?.Value; | 156 | get => this.Fields[(int)CustomActionTupleFields.Win64].AsBool(); |
73 | set => this.Set((int)CustomActionTupleFields.ExtendedType, value); | 157 | set => this.Set((int)CustomActionTupleFields.Win64, value); |
74 | } | 158 | } |
75 | } | 159 | } |
76 | } \ No newline at end of file | 160 | } \ No newline at end of file |