aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Tuples/ServiceControlTuple.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/WixToolset.Data/Tuples/ServiceControlTuple.cs84
1 files changed, 84 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/ServiceControlTuple.cs b/src/WixToolset.Data/Tuples/ServiceControlTuple.cs
new file mode 100644
index 00000000..a2cdc7a0
--- /dev/null
+++ b/src/WixToolset.Data/Tuples/ServiceControlTuple.cs
@@ -0,0 +1,84 @@
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
3namespace WixToolset.Data
4{
5 using WixToolset.Data.Tuples;
6
7 public static partial class TupleDefinitions
8 {
9 public static readonly IntermediateTupleDefinition ServiceControl = new IntermediateTupleDefinition(
10 TupleDefinitionType.ServiceControl,
11 new[]
12 {
13 new IntermediateFieldDefinition(nameof(ServiceControlTupleFields.ServiceControl), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(ServiceControlTupleFields.Name), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(ServiceControlTupleFields.Event), IntermediateFieldType.Number),
16 new IntermediateFieldDefinition(nameof(ServiceControlTupleFields.Arguments), IntermediateFieldType.String),
17 new IntermediateFieldDefinition(nameof(ServiceControlTupleFields.Wait), IntermediateFieldType.Number),
18 new IntermediateFieldDefinition(nameof(ServiceControlTupleFields.Component_), IntermediateFieldType.String),
19 },
20 typeof(ServiceControlTuple));
21 }
22}
23
24namespace WixToolset.Data.Tuples
25{
26 public enum ServiceControlTupleFields
27 {
28 ServiceControl,
29 Name,
30 Event,
31 Arguments,
32 Wait,
33 Component_,
34 }
35
36 public class ServiceControlTuple : IntermediateTuple
37 {
38 public ServiceControlTuple() : base(TupleDefinitions.ServiceControl, null, null)
39 {
40 }
41
42 public ServiceControlTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ServiceControl, sourceLineNumber, id)
43 {
44 }
45
46 public IntermediateField this[ServiceControlTupleFields index] => this.Fields[(int)index];
47
48 public string ServiceControl
49 {
50 get => (string)this.Fields[(int)ServiceControlTupleFields.ServiceControl]?.Value;
51 set => this.Set((int)ServiceControlTupleFields.ServiceControl, value);
52 }
53
54 public string Name
55 {
56 get => (string)this.Fields[(int)ServiceControlTupleFields.Name]?.Value;
57 set => this.Set((int)ServiceControlTupleFields.Name, value);
58 }
59
60 public int Event
61 {
62 get => (int)this.Fields[(int)ServiceControlTupleFields.Event]?.Value;
63 set => this.Set((int)ServiceControlTupleFields.Event, value);
64 }
65
66 public string Arguments
67 {
68 get => (string)this.Fields[(int)ServiceControlTupleFields.Arguments]?.Value;
69 set => this.Set((int)ServiceControlTupleFields.Arguments, value);
70 }
71
72 public int Wait
73 {
74 get => (int)this.Fields[(int)ServiceControlTupleFields.Wait]?.Value;
75 set => this.Set((int)ServiceControlTupleFields.Wait, value);
76 }
77
78 public string Component_
79 {
80 get => (string)this.Fields[(int)ServiceControlTupleFields.Component_]?.Value;
81 set => this.Set((int)ServiceControlTupleFields.Component_, value);
82 }
83 }
84} \ No newline at end of file