aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/WindowsInstaller/Rows/ComponentRow.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2017-12-07 14:17:39 -0800
committerRob Mensching <rob@firegiant.com>2017-12-07 14:17:39 -0800
commit221da62c05ef2b515eb507c77655514cd0ec32a4 (patch)
treefabec5b8ac871f17de6fe0aad3e6188b9af42bfb /src/WixToolset.Data/WindowsInstaller/Rows/ComponentRow.cs
parentca376995792d2e2a1a7f39760989496702a8f603 (diff)
downloadwix-221da62c05ef2b515eb507c77655514cd0ec32a4.tar.gz
wix-221da62c05ef2b515eb507c77655514cd0ec32a4.tar.bz2
wix-221da62c05ef2b515eb507c77655514cd0ec32a4.zip
Reintegrate MSI constructs into WxToolset.Data.WindowsInstaller namespace
Diffstat (limited to 'src/WixToolset.Data/WindowsInstaller/Rows/ComponentRow.cs')
-rw-r--r--src/WixToolset.Data/WindowsInstaller/Rows/ComponentRow.cs244
1 files changed, 244 insertions, 0 deletions
diff --git a/src/WixToolset.Data/WindowsInstaller/Rows/ComponentRow.cs b/src/WixToolset.Data/WindowsInstaller/Rows/ComponentRow.cs
new file mode 100644
index 00000000..50ef5313
--- /dev/null
+++ b/src/WixToolset.Data/WindowsInstaller/Rows/ComponentRow.cs
@@ -0,0 +1,244 @@
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.WindowsInstaller.Rows
4{
5 using WixToolset.Data.Msi;
6
7 /// <summary>
8 /// Specialization of a row for the Component table.
9 /// </summary>
10 public sealed class ComponentRow : Row
11 {
12 private string sourceFile;
13
14 /// <summary>
15 /// Creates a Control row that belongs to a table.
16 /// </summary>
17 /// <param name="sourceLineNumbers">Original source lines for this row.</param>
18 /// <param name="table">Table this Component row belongs to and should get its column definitions from.</param>
19 public ComponentRow(SourceLineNumber sourceLineNumbers, Table table) :
20 base(sourceLineNumbers, table)
21 {
22 }
23
24 /// <summary>
25 /// Gets or sets the identifier for this Component row.
26 /// </summary>
27 /// <value>Identifier for this Component row.</value>
28 public string Component
29 {
30 get { return (string)this.Fields[0].Data; }
31 set { this.Fields[0].Data = value; }
32 }
33
34 /// <summary>
35 /// Gets or sets the ComponentId for this Component row.
36 /// </summary>
37 /// <value>guid for this Component row.</value>
38 public string Guid
39 {
40 get { return (string)this.Fields[1].Data; }
41 set { this.Fields[1].Data = value; }
42 }
43
44 /// <summary>
45 /// Gets or sets the Directory_ of the Component.
46 /// </summary>
47 /// <value>Directory of the Component.</value>
48 public string Directory
49 {
50 get { return (string)this.Fields[2].Data; }
51 set { this.Fields[2].Data = value; }
52 }
53
54 /// <summary>
55 /// Gets or sets the local only attribute of the Component.
56 /// </summary>
57 /// <value>Local only attribute of the component.</value>
58 public bool IsLocalOnly
59 {
60 get { return MsiInterop.MsidbComponentAttributesLocalOnly == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesLocalOnly); }
61 set
62 {
63 if (value)
64 {
65 this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesLocalOnly;
66 }
67 else
68 {
69 this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesLocalOnly;
70 }
71 }
72 }
73
74 /// <summary>
75 /// Gets or sets the source only attribute of the Component.
76 /// </summary>
77 /// <value>Source only attribute of the component.</value>
78 public bool IsSourceOnly
79 {
80 get { return MsiInterop.MsidbComponentAttributesSourceOnly == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesSourceOnly); }
81 set
82 {
83 if (value)
84 {
85 this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesSourceOnly;
86 }
87 else
88 {
89 this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesSourceOnly;
90 }
91 }
92 }
93
94 /// <summary>
95 /// Gets or sets the optional attribute of the Component.
96 /// </summary>
97 /// <value>Optional attribute of the component.</value>
98 public bool IsOptional
99 {
100 get { return MsiInterop.MsidbComponentAttributesOptional == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesOptional); }
101 set
102 {
103 if (value)
104 {
105 this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesOptional;
106 }
107 else
108 {
109 this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesOptional;
110 }
111 }
112 }
113
114 /// <summary>
115 /// Gets or sets the registry key path attribute of the Component.
116 /// </summary>
117 /// <value>Registry key path attribute of the component.</value>
118 public bool IsRegistryKeyPath
119 {
120 get { return MsiInterop.MsidbComponentAttributesRegistryKeyPath == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesRegistryKeyPath); }
121 set
122 {
123 if (value)
124 {
125 this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesRegistryKeyPath;
126 }
127 else
128 {
129 this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesRegistryKeyPath;
130 }
131 }
132 }
133
134 /// <summary>
135 /// Gets or sets the shared dll ref count attribute of the Component.
136 /// </summary>
137 /// <value>Shared dll ref countattribute of the component.</value>
138 public bool IsSharedDll
139 {
140 get { return MsiInterop.MsidbComponentAttributesSharedDllRefCount == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesSharedDllRefCount); }
141 set
142 {
143 if (value)
144 {
145 this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesSharedDllRefCount;
146 }
147 else
148 {
149 this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesSharedDllRefCount;
150 }
151 }
152 }
153
154 /// <summary>
155 /// Gets or sets the permanent attribute of the Component.
156 /// </summary>
157 /// <value>Permanent attribute of the component.</value>
158 public bool IsPermanent
159 {
160 get { return MsiInterop.MsidbComponentAttributesPermanent == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesPermanent); }
161 set
162 {
163 if (value)
164 {
165 this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesPermanent;
166 }
167 else
168 {
169 this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesPermanent;
170 }
171 }
172 }
173
174 /// <summary>
175 /// Gets or sets the ODBC data source key path attribute of the Component.
176 /// </summary>
177 /// <value>ODBC data source key path attribute of the component.</value>
178 public bool IsOdbcDataSourceKeyPath
179 {
180 get { return MsiInterop.MsidbComponentAttributesODBCDataSource == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesODBCDataSource); }
181 set
182 {
183 if (value)
184 {
185 this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesODBCDataSource;
186 }
187 else
188 {
189 this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesODBCDataSource;
190 }
191 }
192 }
193
194 /// <summary>
195 /// Gets or sets the 64 bit attribute of the Component.
196 /// </summary>
197 /// <value>64-bitness of the component.</value>
198 public bool Is64Bit
199 {
200 get { return MsiInterop.MsidbComponentAttributes64bit == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributes64bit); }
201 set
202 {
203 if (value)
204 {
205 this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributes64bit;
206 }
207 else
208 {
209 this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributes64bit;
210 }
211 }
212 }
213
214 /// <summary>
215 /// Gets or sets the condition of the Component.
216 /// </summary>
217 /// <value>Condition of the Component.</value>
218 public string Condition
219 {
220 get { return (string)this.Fields[4].Data; }
221 set { this.Fields[4].Data = value; }
222 }
223
224 /// <summary>
225 /// Gets or sets the key path of the Component.
226 /// </summary>
227 /// <value>Key path of the Component.</value>
228 public string KeyPath
229 {
230 get { return (string)this.Fields[5].Data; }
231 set { this.Fields[5].Data = value; }
232 }
233
234 /// <summary>
235 /// Gets or sets the source location to the file to fill in the Text of the control.
236 /// </summary>
237 /// <value>Source location to the file to fill in the Text of the control.</value>
238 public string SourceFile
239 {
240 get { return this.sourceFile; }
241 set { this.sourceFile = value; }
242 }
243 }
244}