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
|
// 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 Component = new IntermediateTupleDefinition(
TupleDefinitionType.Component,
new[]
{
new IntermediateFieldDefinition(nameof(ComponentTupleFields.ComponentId), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(ComponentTupleFields.DirectoryRef), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(ComponentTupleFields.Location), IntermediateFieldType.Number),
new IntermediateFieldDefinition(nameof(ComponentTupleFields.DisableRegistryReflection), IntermediateFieldType.Bool),
new IntermediateFieldDefinition(nameof(ComponentTupleFields.NeverOverwrite), IntermediateFieldType.Bool),
new IntermediateFieldDefinition(nameof(ComponentTupleFields.Permanent), IntermediateFieldType.Bool),
new IntermediateFieldDefinition(nameof(ComponentTupleFields.SharedDllRefCount), IntermediateFieldType.Bool),
new IntermediateFieldDefinition(nameof(ComponentTupleFields.Shared), IntermediateFieldType.Bool),
new IntermediateFieldDefinition(nameof(ComponentTupleFields.Transitive), IntermediateFieldType.Bool),
new IntermediateFieldDefinition(nameof(ComponentTupleFields.UninstallWhenSuperseded), IntermediateFieldType.Bool),
new IntermediateFieldDefinition(nameof(ComponentTupleFields.Win64), IntermediateFieldType.Bool),
new IntermediateFieldDefinition(nameof(ComponentTupleFields.Condition), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(ComponentTupleFields.KeyPath), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(ComponentTupleFields.KeyPathType), IntermediateFieldType.Number),
},
typeof(ComponentTuple));
}
}
namespace WixToolset.Data.Tuples
{
public enum ComponentTupleFields
{
ComponentId,
DirectoryRef,
Location,
DisableRegistryReflection,
NeverOverwrite,
Permanent,
SharedDllRefCount,
Shared,
Transitive,
UninstallWhenSuperseded,
Win64,
Condition,
KeyPath,
KeyPathType,
}
public enum ComponentLocation
{
LocalOnly,
SourceOnly,
Either
}
public class ComponentTuple : IntermediateTuple
{
public ComponentTuple() : base(TupleDefinitions.Component, null, null)
{
}
public ComponentTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Component, sourceLineNumber, id)
{
}
public IntermediateField this[ComponentTupleFields index] => this.Fields[(int)index];
public string ComponentId
{
get => (string)this.Fields[(int)ComponentTupleFields.ComponentId];
set => this.Set((int)ComponentTupleFields.ComponentId, value);
}
public string DirectoryRef
{
get => (string)this.Fields[(int)ComponentTupleFields.DirectoryRef];
set => this.Set((int)ComponentTupleFields.DirectoryRef, value);
}
public ComponentLocation Location
{
get => (ComponentLocation)this.Fields[(int)ComponentTupleFields.Location].AsNumber();
set => this.Set((int)ComponentTupleFields.Location, (int)value);
}
public bool DisableRegistryReflection
{
get => this.Fields[(int)ComponentTupleFields.DisableRegistryReflection].AsBool();
set => this.Set((int)ComponentTupleFields.DisableRegistryReflection, value);
}
public bool NeverOverwrite
{
get => this.Fields[(int)ComponentTupleFields.NeverOverwrite].AsBool();
set => this.Set((int)ComponentTupleFields.NeverOverwrite, value);
}
public bool Permanent
{
get => this.Fields[(int)ComponentTupleFields.Permanent].AsBool();
set => this.Set((int)ComponentTupleFields.Permanent, value);
}
public bool SharedDllRefCount
{
get => this.Fields[(int)ComponentTupleFields.SharedDllRefCount].AsBool();
set => this.Set((int)ComponentTupleFields.SharedDllRefCount, value);
}
public bool Shared
{
get => this.Fields[(int)ComponentTupleFields.Shared].AsBool();
set => this.Set((int)ComponentTupleFields.Shared, value);
}
public bool Transitive
{
get => this.Fields[(int)ComponentTupleFields.Transitive].AsBool();
set => this.Set((int)ComponentTupleFields.Transitive, value);
}
public bool UninstallWhenSuperseded
{
get => this.Fields[(int)ComponentTupleFields.UninstallWhenSuperseded].AsBool();
set => this.Set((int)ComponentTupleFields.UninstallWhenSuperseded, value);
}
public bool Win64
{
get => this.Fields[(int)ComponentTupleFields.Win64].AsBool();
set => this.Set((int)ComponentTupleFields.Win64, value);
}
public string Condition
{
get => (string)this.Fields[(int)ComponentTupleFields.Condition];
set => this.Set((int)ComponentTupleFields.Condition, value);
}
public string KeyPath
{
get => (string)this.Fields[(int)ComponentTupleFields.KeyPath];
set => this.Set((int)ComponentTupleFields.KeyPath, value);
}
public ComponentKeyPathType KeyPathType
{
get => (ComponentKeyPathType)this.Fields[(int)ComponentTupleFields.KeyPathType].AsNumber();
set => this.Set((int)ComponentTupleFields.KeyPathType, (int)value);
}
}
}
|