1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
// 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.
namespace WixToolset.Data
{
using WixToolset.Data.Tuples;
public static partial class TupleDefinitions
{
public static readonly IntermediateTupleDefinition ServiceInstall = new IntermediateTupleDefinition(
TupleDefinitionType.ServiceInstall,
new[]
{
new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.Name), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.DisplayName), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.ServiceType), IntermediateFieldType.Number),
new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.StartType), IntermediateFieldType.Number),
new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.ErrorControl), IntermediateFieldType.Number),
new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.LoadOrderGroup), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.Dependencies), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.StartName), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.Password), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.Arguments), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.Component_), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.Description), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.Interactive), IntermediateFieldType.Bool),
new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.Vital), IntermediateFieldType.Bool),
},
typeof(ServiceInstallTuple));
}
}
namespace WixToolset.Data.Tuples
{
public enum ServiceInstallTupleFields
{
Name,
DisplayName,
ServiceType,
StartType,
ErrorControl,
LoadOrderGroup,
Dependencies,
StartName,
Password,
Arguments,
Component_,
Description,
Interactive,
Vital,
}
public enum ServiceType
{
KernelDriver,
SystemDriver,
OwnProcess = 4,
ShareProcess = 8,
InteractiveProcess = 256,
}
public enum ServiceStartType
{
Boot,
System,
Auto,
Demand,
Disabled,
}
public enum ServiceErrorControl
{
Ignore,
Normal,
Critical = 3,
}
public class ServiceInstallTuple : IntermediateTuple
{
public ServiceInstallTuple() : base(TupleDefinitions.ServiceInstall, null, null)
{
}
public ServiceInstallTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ServiceInstall, sourceLineNumber, id)
{
}
public IntermediateField this[ServiceInstallTupleFields index] => this.Fields[(int)index];
public string Name
{
get => (string)this.Fields[(int)ServiceInstallTupleFields.Name];
set => this.Set((int)ServiceInstallTupleFields.Name, value);
}
public string DisplayName
{
get => (string)this.Fields[(int)ServiceInstallTupleFields.DisplayName];
set => this.Set((int)ServiceInstallTupleFields.DisplayName, value);
}
public ServiceType ServiceType
{
get => (ServiceType)this.Fields[(int)ServiceInstallTupleFields.ServiceType].AsNumber();
set => this.Set((int)ServiceInstallTupleFields.ServiceType, (int)value);
}
public ServiceStartType StartType
{
get => (ServiceStartType)this.Fields[(int)ServiceInstallTupleFields.StartType].AsNumber();
set => this.Set((int)ServiceInstallTupleFields.StartType, (int)value);
}
public ServiceErrorControl ErrorControl
{
get => (ServiceErrorControl)this.Fields[(int)ServiceInstallTupleFields.ErrorControl].AsNumber();
set => this.Set((int)ServiceInstallTupleFields.ErrorControl, (int)value);
}
public string LoadOrderGroup
{
get => (string)this.Fields[(int)ServiceInstallTupleFields.LoadOrderGroup];
set => this.Set((int)ServiceInstallTupleFields.LoadOrderGroup, value);
}
public string Dependencies
{
get => (string)this.Fields[(int)ServiceInstallTupleFields.Dependencies];
set => this.Set((int)ServiceInstallTupleFields.Dependencies, value);
}
public string StartName
{
get => (string)this.Fields[(int)ServiceInstallTupleFields.StartName];
set => this.Set((int)ServiceInstallTupleFields.StartName, value);
}
public string Password
{
get => (string)this.Fields[(int)ServiceInstallTupleFields.Password];
set => this.Set((int)ServiceInstallTupleFields.Password, value);
}
public string Arguments
{
get => (string)this.Fields[(int)ServiceInstallTupleFields.Arguments];
set => this.Set((int)ServiceInstallTupleFields.Arguments, value);
}
public string Component_
{
get => (string)this.Fields[(int)ServiceInstallTupleFields.Component_];
set => this.Set((int)ServiceInstallTupleFields.Component_, value);
}
public string Description
{
get => (string)this.Fields[(int)ServiceInstallTupleFields.Description];
set => this.Set((int)ServiceInstallTupleFields.Description, value);
}
public bool Interactive
{
get => this.Fields[(int)ServiceInstallTupleFields.Interactive].AsBool();
set => this.Set((int)ServiceInstallTupleFields.Interactive, value);
}
public bool Vital
{
get => this.Fields[(int)ServiceInstallTupleFields.Vital].AsBool();
set => this.Set((int)ServiceInstallTupleFields.Vital, value);
}
}
}
|