diff options
Diffstat (limited to 'src/ext/ComPlus/wixext/ComPlusDecompiler.cs')
-rw-r--r-- | src/ext/ComPlus/wixext/ComPlusDecompiler.cs | 1845 |
1 files changed, 1845 insertions, 0 deletions
diff --git a/src/ext/ComPlus/wixext/ComPlusDecompiler.cs b/src/ext/ComPlus/wixext/ComPlusDecompiler.cs new file mode 100644 index 00000000..6da2df94 --- /dev/null +++ b/src/ext/ComPlus/wixext/ComPlusDecompiler.cs | |||
@@ -0,0 +1,1845 @@ | |||
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 | |||
3 | namespace WixToolset.ComPlus | ||
4 | { | ||
5 | #if TODO_CONSIDER_DECOMPILER | ||
6 | using System; | ||
7 | using System.Collections; | ||
8 | using System.Globalization; | ||
9 | using WixToolset.Data; | ||
10 | using WixToolset.Extensibility; | ||
11 | using ComPlus = WixToolset.Extensions.Serialize.ComPlus; | ||
12 | using Wix = WixToolset.Data.Serialize; | ||
13 | |||
14 | /// <summary> | ||
15 | /// The decompiler for the WiX Toolset COM+ Extension. | ||
16 | /// </summary> | ||
17 | public sealed class ComPlusDecompiler : DecompilerExtension | ||
18 | { | ||
19 | /// <summary> | ||
20 | /// Creates a decompiler for ComPlus Extension. | ||
21 | /// </summary> | ||
22 | public ComPlusDecompiler() | ||
23 | { | ||
24 | this.TableDefinitions = ComPlusExtensionData.GetExtensionTableDefinitions(); | ||
25 | } | ||
26 | |||
27 | /// <summary> | ||
28 | /// Get the extensions library to be removed. | ||
29 | /// </summary> | ||
30 | /// <param name="tableDefinitions">Table definitions for library.</param> | ||
31 | /// <returns>Library to remove from decompiled output.</returns> | ||
32 | public override Library GetLibraryToRemove(TableDefinitionCollection tableDefinitions) | ||
33 | { | ||
34 | return ComPlusExtensionData.GetExtensionLibrary(tableDefinitions); | ||
35 | } | ||
36 | |||
37 | /// <summary> | ||
38 | /// Decompiles an extension table. | ||
39 | /// </summary> | ||
40 | /// <param name="table">The table to decompile.</param> | ||
41 | public override void DecompileTable(Table table) | ||
42 | { | ||
43 | switch (table.Name) | ||
44 | { | ||
45 | case "ComPlusPartition": | ||
46 | this.DecompileComPlusPartitionTable(table); | ||
47 | break; | ||
48 | case "ComPlusPartitionProperty": | ||
49 | this.DecompileComPlusPartitionPropertyTable(table); | ||
50 | break; | ||
51 | case "ComPlusPartitionRole": | ||
52 | this.DecompileComPlusPartitionRoleTable(table); | ||
53 | break; | ||
54 | case "ComPlusUserInPartitionRole": | ||
55 | this.DecompileComPlusUserInPartitionRoleTable(table); | ||
56 | break; | ||
57 | case "ComPlusGroupInPartitionRole": | ||
58 | this.DecompileComPlusGroupInPartitionRoleTable(table); | ||
59 | break; | ||
60 | case "ComPlusPartitionUser": | ||
61 | this.DecompileComPlusPartitionUserTable(table); | ||
62 | break; | ||
63 | case "ComPlusApplication": | ||
64 | this.DecompileComPlusApplicationTable(table); | ||
65 | break; | ||
66 | case "ComPlusApplicationProperty": | ||
67 | this.DecompileComPlusApplicationPropertyTable(table); | ||
68 | break; | ||
69 | case "ComPlusApplicationRole": | ||
70 | this.DecompileComPlusApplicationRoleTable(table); | ||
71 | break; | ||
72 | case "ComPlusApplicationRoleProperty": | ||
73 | this.DecompileComPlusApplicationRolePropertyTable(table); | ||
74 | break; | ||
75 | case "ComPlusUserInApplicationRole": | ||
76 | this.DecompileComPlusUserInApplicationRoleTable(table); | ||
77 | break; | ||
78 | case "ComPlusGroupInApplicationRole": | ||
79 | this.DecompileComPlusGroupInApplicationRoleTable(table); | ||
80 | break; | ||
81 | case "ComPlusAssembly": | ||
82 | this.DecompileComPlusAssemblyTable(table); | ||
83 | break; | ||
84 | case "ComPlusComponent": | ||
85 | this.DecompileComPlusComponentTable(table); | ||
86 | break; | ||
87 | case "ComPlusComponentProperty": | ||
88 | this.DecompileComPlusComponentPropertyTable(table); | ||
89 | break; | ||
90 | case "ComPlusRoleForComponent": | ||
91 | this.DecompileComPlusRoleForComponentTable(table); | ||
92 | break; | ||
93 | case "ComPlusInterface": | ||
94 | this.DecompileComPlusInterfaceTable(table); | ||
95 | break; | ||
96 | case "ComPlusInterfaceProperty": | ||
97 | this.DecompileComPlusInterfacePropertyTable(table); | ||
98 | break; | ||
99 | case "ComPlusRoleForInterface": | ||
100 | this.DecompileComPlusRoleForInterfaceTable(table); | ||
101 | break; | ||
102 | case "ComPlusMethod": | ||
103 | this.DecompileComPlusMethodTable(table); | ||
104 | break; | ||
105 | case "ComPlusMethodProperty": | ||
106 | this.DecompileComPlusMethodPropertyTable(table); | ||
107 | break; | ||
108 | case "ComPlusRoleForMethod": | ||
109 | this.DecompileComPlusRoleForMethodTable(table); | ||
110 | break; | ||
111 | case "ComPlusSubscription": | ||
112 | this.DecompileComPlusSubscriptionTable(table); | ||
113 | break; | ||
114 | case "ComPlusSubscriptionProperty": | ||
115 | this.DecompileComPlusSubscriptionPropertyTable(table); | ||
116 | break; | ||
117 | default: | ||
118 | base.DecompileTable(table); | ||
119 | break; | ||
120 | } | ||
121 | } | ||
122 | |||
123 | /// <summary> | ||
124 | /// Decompile the ComPlusPartition table. | ||
125 | /// </summary> | ||
126 | /// <param name="table">The table to decompile.</param> | ||
127 | private void DecompileComPlusPartitionTable(Table table) | ||
128 | { | ||
129 | foreach (Row row in table.Rows) | ||
130 | { | ||
131 | ComPlus.ComPlusPartition partition = new ComPlus.ComPlusPartition(); | ||
132 | |||
133 | partition.Id = (string)row[0]; | ||
134 | |||
135 | if (null != row[2]) | ||
136 | { | ||
137 | partition.PartitionId = (string)row[2]; | ||
138 | } | ||
139 | |||
140 | if (null != row[3]) | ||
141 | { | ||
142 | partition.Name = (string)row[3]; | ||
143 | } | ||
144 | |||
145 | if (null != row[1]) | ||
146 | { | ||
147 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[1]); | ||
148 | if (null != component) | ||
149 | { | ||
150 | component.AddChild(partition); | ||
151 | } | ||
152 | else | ||
153 | { | ||
154 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[1], "Component")); | ||
155 | } | ||
156 | } | ||
157 | else | ||
158 | { | ||
159 | this.Core.RootElement.AddChild(partition); | ||
160 | } | ||
161 | this.Core.IndexElement(row, partition); | ||
162 | } | ||
163 | } | ||
164 | |||
165 | /// <summary> | ||
166 | /// Decompile the ComPlusPartitionProperty table. | ||
167 | /// </summary> | ||
168 | /// <param name="table">The table to decompile.</param> | ||
169 | private void DecompileComPlusPartitionPropertyTable(Table table) | ||
170 | { | ||
171 | foreach (Row row in table.Rows) | ||
172 | { | ||
173 | ComPlus.ComPlusPartition partition = (ComPlus.ComPlusPartition)this.Core.GetIndexedElement("ComPlusPartition", (string)row[0]); | ||
174 | if (null == partition) | ||
175 | { | ||
176 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Partition_", (string)row[0], "ComPlusPartition")); | ||
177 | } | ||
178 | |||
179 | switch ((string)row[1]) | ||
180 | { | ||
181 | case "Changeable": | ||
182 | switch ((string)row[2]) | ||
183 | { | ||
184 | case "1": | ||
185 | partition.Changeable = ComPlus.YesNoType.yes; | ||
186 | break; | ||
187 | case "0": | ||
188 | partition.Changeable = ComPlus.YesNoType.no; | ||
189 | break; | ||
190 | default: | ||
191 | // TODO: Warning | ||
192 | break; | ||
193 | } | ||
194 | break; | ||
195 | case "Deleteable": | ||
196 | switch ((string)row[2]) | ||
197 | { | ||
198 | case "1": | ||
199 | partition.Deleteable = ComPlus.YesNoType.yes; | ||
200 | break; | ||
201 | case "0": | ||
202 | partition.Deleteable = ComPlus.YesNoType.no; | ||
203 | break; | ||
204 | default: | ||
205 | // TODO: Warning | ||
206 | break; | ||
207 | } | ||
208 | break; | ||
209 | case "Description": | ||
210 | partition.Description = (string)row[2]; | ||
211 | break; | ||
212 | default: | ||
213 | // TODO: Warning | ||
214 | break; | ||
215 | } | ||
216 | } | ||
217 | } | ||
218 | |||
219 | /// <summary> | ||
220 | /// Decompile the ComPlusPartitionRole table. | ||
221 | /// </summary> | ||
222 | /// <param name="table">The table to decompile.</param> | ||
223 | private void DecompileComPlusPartitionRoleTable(Table table) | ||
224 | { | ||
225 | foreach (Row row in table.Rows) | ||
226 | { | ||
227 | ComPlus.ComPlusPartitionRole partitionRole = new ComPlus.ComPlusPartitionRole(); | ||
228 | |||
229 | partitionRole.Id = (string)row[0]; | ||
230 | partitionRole.Partition = (string)row[1]; | ||
231 | partitionRole.Name = (string)row[3]; | ||
232 | |||
233 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
234 | if (null != component) | ||
235 | { | ||
236 | component.AddChild(partitionRole); | ||
237 | } | ||
238 | else | ||
239 | { | ||
240 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
241 | } | ||
242 | } | ||
243 | } | ||
244 | |||
245 | /// <summary> | ||
246 | /// Decompile the ComPlusUserInPartitionRole table. | ||
247 | /// </summary> | ||
248 | /// <param name="table">The table to decompile.</param> | ||
249 | private void DecompileComPlusUserInPartitionRoleTable(Table table) | ||
250 | { | ||
251 | foreach (Row row in table.Rows) | ||
252 | { | ||
253 | ComPlus.ComPlusUserInPartitionRole userInPartitionRole = new ComPlus.ComPlusUserInPartitionRole(); | ||
254 | |||
255 | userInPartitionRole.Id = (string)row[0]; | ||
256 | userInPartitionRole.PartitionRole = (string)row[1]; | ||
257 | userInPartitionRole.User = (string)row[3]; | ||
258 | |||
259 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
260 | if (null != component) | ||
261 | { | ||
262 | component.AddChild(userInPartitionRole); | ||
263 | } | ||
264 | else | ||
265 | { | ||
266 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
267 | } | ||
268 | } | ||
269 | } | ||
270 | |||
271 | /// <summary> | ||
272 | /// Decompile the ComPlusGroupInPartitionRole table. | ||
273 | /// </summary> | ||
274 | /// <param name="table">The table to decompile.</param> | ||
275 | private void DecompileComPlusGroupInPartitionRoleTable(Table table) | ||
276 | { | ||
277 | foreach (Row row in table.Rows) | ||
278 | { | ||
279 | ComPlus.ComPlusGroupInPartitionRole groupInPartitionRole = new ComPlus.ComPlusGroupInPartitionRole(); | ||
280 | |||
281 | groupInPartitionRole.Id = (string)row[0]; | ||
282 | groupInPartitionRole.PartitionRole = (string)row[1]; | ||
283 | groupInPartitionRole.Group = (string)row[3]; | ||
284 | |||
285 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
286 | if (null != component) | ||
287 | { | ||
288 | component.AddChild(groupInPartitionRole); | ||
289 | } | ||
290 | else | ||
291 | { | ||
292 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
293 | } | ||
294 | } | ||
295 | } | ||
296 | |||
297 | /// <summary> | ||
298 | /// Decompile the ComPlusPartitionUser table. | ||
299 | /// </summary> | ||
300 | /// <param name="table">The table to decompile.</param> | ||
301 | private void DecompileComPlusPartitionUserTable(Table table) | ||
302 | { | ||
303 | foreach (Row row in table.Rows) | ||
304 | { | ||
305 | ComPlus.ComPlusPartitionUser partitionUser = new ComPlus.ComPlusPartitionUser(); | ||
306 | |||
307 | partitionUser.Id = (string)row[0]; | ||
308 | partitionUser.Partition = (string)row[1]; | ||
309 | partitionUser.User = (string)row[3]; | ||
310 | |||
311 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
312 | if (null != component) | ||
313 | { | ||
314 | component.AddChild(partitionUser); | ||
315 | } | ||
316 | else | ||
317 | { | ||
318 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
319 | } | ||
320 | } | ||
321 | } | ||
322 | |||
323 | /// <summary> | ||
324 | /// Decompile the ComPlusApplication table. | ||
325 | /// </summary> | ||
326 | /// <param name="table">The table to decompile.</param> | ||
327 | private void DecompileComPlusApplicationTable(Table table) | ||
328 | { | ||
329 | foreach (Row row in table.Rows) | ||
330 | { | ||
331 | ComPlus.ComPlusApplication application = new ComPlus.ComPlusApplication(); | ||
332 | |||
333 | application.Id = (string)row[0]; | ||
334 | application.Partition = (string)row[1]; | ||
335 | |||
336 | if (null != row[3]) | ||
337 | { | ||
338 | application.ApplicationId = (string)row[3]; | ||
339 | } | ||
340 | |||
341 | if (null != row[4]) | ||
342 | { | ||
343 | application.Name = (string)row[4]; | ||
344 | } | ||
345 | |||
346 | if (null != row[2]) | ||
347 | { | ||
348 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[1]); | ||
349 | if (null != component) | ||
350 | { | ||
351 | component.AddChild(application); | ||
352 | } | ||
353 | else | ||
354 | { | ||
355 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
356 | } | ||
357 | } | ||
358 | else | ||
359 | { | ||
360 | this.Core.RootElement.AddChild(application); | ||
361 | } | ||
362 | this.Core.IndexElement(row, application); | ||
363 | } | ||
364 | } | ||
365 | |||
366 | /// <summary> | ||
367 | /// Decompile the ComPlusApplicationProperty table. | ||
368 | /// </summary> | ||
369 | /// <param name="table">The table to decompile.</param> | ||
370 | private void DecompileComPlusApplicationPropertyTable(Table table) | ||
371 | { | ||
372 | foreach (Row row in table.Rows) | ||
373 | { | ||
374 | ComPlus.ComPlusApplication application = (ComPlus.ComPlusApplication)this.Core.GetIndexedElement("ComPlusApplication", (string)row[0]); | ||
375 | if (null == application) | ||
376 | { | ||
377 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Application_", (string)row[0], "ComPlusApplication")); | ||
378 | } | ||
379 | |||
380 | switch ((string)row[1]) | ||
381 | { | ||
382 | case "3GigSupportEnabled": | ||
383 | switch ((string)row[2]) | ||
384 | { | ||
385 | case "1": | ||
386 | application.ThreeGigSupportEnabled = ComPlus.YesNoType.yes; | ||
387 | break; | ||
388 | case "0": | ||
389 | application.ThreeGigSupportEnabled = ComPlus.YesNoType.no; | ||
390 | break; | ||
391 | default: | ||
392 | // TODO: Warning | ||
393 | break; | ||
394 | } | ||
395 | break; | ||
396 | case "AccessChecksLevel": | ||
397 | switch ((string)row[2]) | ||
398 | { | ||
399 | case "0": | ||
400 | application.AccessChecksLevel = ComPlus.ComPlusApplication.AccessChecksLevelType.applicationLevel; | ||
401 | break; | ||
402 | case "1": | ||
403 | application.AccessChecksLevel = ComPlus.ComPlusApplication.AccessChecksLevelType.applicationComponentLevel; | ||
404 | break; | ||
405 | default: | ||
406 | // TODO: Warning | ||
407 | break; | ||
408 | } | ||
409 | break; | ||
410 | case "Activation": | ||
411 | switch ((string)row[2]) | ||
412 | { | ||
413 | case "Inproc": | ||
414 | application.Activation = ComPlus.ComPlusApplication.ActivationType.inproc; | ||
415 | break; | ||
416 | case "Local": | ||
417 | application.Activation = ComPlus.ComPlusApplication.ActivationType.local; | ||
418 | break; | ||
419 | default: | ||
420 | // TODO: Warning | ||
421 | break; | ||
422 | } | ||
423 | break; | ||
424 | case "ApplicationAccessChecksEnabled": | ||
425 | switch ((string)row[2]) | ||
426 | { | ||
427 | case "1": | ||
428 | application.ApplicationAccessChecksEnabled = ComPlus.YesNoType.yes; | ||
429 | break; | ||
430 | case "0": | ||
431 | application.ApplicationAccessChecksEnabled = ComPlus.YesNoType.no; | ||
432 | break; | ||
433 | default: | ||
434 | // TODO: Warning | ||
435 | break; | ||
436 | } | ||
437 | break; | ||
438 | case "ApplicationDirectory": | ||
439 | application.ApplicationDirectory = (string)row[2]; | ||
440 | break; | ||
441 | case "Authentication": | ||
442 | switch ((string)row[2]) | ||
443 | { | ||
444 | case "0": | ||
445 | application.Authentication = ComPlus.ComPlusApplication.AuthenticationType.@default; | ||
446 | break; | ||
447 | case "1": | ||
448 | application.Authentication = ComPlus.ComPlusApplication.AuthenticationType.none; | ||
449 | break; | ||
450 | case "2": | ||
451 | application.Authentication = ComPlus.ComPlusApplication.AuthenticationType.connect; | ||
452 | break; | ||
453 | case "3": | ||
454 | application.Authentication = ComPlus.ComPlusApplication.AuthenticationType.call; | ||
455 | break; | ||
456 | case "4": | ||
457 | application.Authentication = ComPlus.ComPlusApplication.AuthenticationType.packet; | ||
458 | break; | ||
459 | case "5": | ||
460 | application.Authentication = ComPlus.ComPlusApplication.AuthenticationType.integrity; | ||
461 | break; | ||
462 | case "6": | ||
463 | application.Authentication = ComPlus.ComPlusApplication.AuthenticationType.privacy; | ||
464 | break; | ||
465 | default: | ||
466 | // TODO: Warning | ||
467 | break; | ||
468 | } | ||
469 | break; | ||
470 | case "AuthenticationCapability": | ||
471 | switch ((string)row[2]) | ||
472 | { | ||
473 | case "0": | ||
474 | application.AuthenticationCapability = ComPlus.ComPlusApplication.AuthenticationCapabilityType.none; | ||
475 | break; | ||
476 | case "2": | ||
477 | application.AuthenticationCapability = ComPlus.ComPlusApplication.AuthenticationCapabilityType.secureReference; | ||
478 | break; | ||
479 | case "32": | ||
480 | application.AuthenticationCapability = ComPlus.ComPlusApplication.AuthenticationCapabilityType.staticCloaking; | ||
481 | break; | ||
482 | case "64": | ||
483 | application.AuthenticationCapability = ComPlus.ComPlusApplication.AuthenticationCapabilityType.dynamicCloaking; | ||
484 | break; | ||
485 | default: | ||
486 | // TODO: Warning | ||
487 | break; | ||
488 | } | ||
489 | break; | ||
490 | case "Changeable": | ||
491 | switch ((string)row[2]) | ||
492 | { | ||
493 | case "1": | ||
494 | application.Changeable = ComPlus.YesNoType.yes; | ||
495 | break; | ||
496 | case "0": | ||
497 | application.Changeable = ComPlus.YesNoType.no; | ||
498 | break; | ||
499 | default: | ||
500 | // TODO: Warning | ||
501 | break; | ||
502 | } | ||
503 | break; | ||
504 | case "CommandLine": | ||
505 | application.CommandLine = (string)row[2]; | ||
506 | break; | ||
507 | case "ConcurrentApps": | ||
508 | int concurrentApps; | ||
509 | if (Int32.TryParse((string)row[2], out concurrentApps)) | ||
510 | { | ||
511 | application.ConcurrentApps = concurrentApps; | ||
512 | } | ||
513 | else | ||
514 | { | ||
515 | // TODO: Warning | ||
516 | } | ||
517 | break; | ||
518 | case "CreatedBy": | ||
519 | application.CreatedBy = (string)row[2]; | ||
520 | break; | ||
521 | case "CRMEnabled": | ||
522 | switch ((string)row[2]) | ||
523 | { | ||
524 | case "1": | ||
525 | application.CRMEnabled = ComPlus.YesNoType.yes; | ||
526 | break; | ||
527 | case "0": | ||
528 | application.CRMEnabled = ComPlus.YesNoType.no; | ||
529 | break; | ||
530 | default: | ||
531 | // TODO: Warning | ||
532 | break; | ||
533 | } | ||
534 | break; | ||
535 | case "CRMLogFile": | ||
536 | application.CRMLogFile = (string)row[2]; | ||
537 | break; | ||
538 | case "Deleteable": | ||
539 | switch ((string)row[2]) | ||
540 | { | ||
541 | case "1": | ||
542 | application.Deleteable = ComPlus.YesNoType.yes; | ||
543 | break; | ||
544 | case "0": | ||
545 | application.Deleteable = ComPlus.YesNoType.no; | ||
546 | break; | ||
547 | default: | ||
548 | // TODO: Warning | ||
549 | break; | ||
550 | } | ||
551 | break; | ||
552 | case "Description": | ||
553 | application.Description = (string)row[2]; | ||
554 | break; | ||
555 | case "DumpEnabled": | ||
556 | switch ((string)row[2]) | ||
557 | { | ||
558 | case "1": | ||
559 | application.DumpEnabled = ComPlus.YesNoType.yes; | ||
560 | break; | ||
561 | case "0": | ||
562 | application.DumpEnabled = ComPlus.YesNoType.no; | ||
563 | break; | ||
564 | default: | ||
565 | // TODO: Warning | ||
566 | break; | ||
567 | } | ||
568 | break; | ||
569 | case "DumpOnException": | ||
570 | switch ((string)row[2]) | ||
571 | { | ||
572 | case "1": | ||
573 | application.DumpOnException = ComPlus.YesNoType.yes; | ||
574 | break; | ||
575 | case "0": | ||
576 | application.DumpOnException = ComPlus.YesNoType.no; | ||
577 | break; | ||
578 | default: | ||
579 | // TODO: Warning | ||
580 | break; | ||
581 | } | ||
582 | break; | ||
583 | case "DumpOnFailfast": | ||
584 | switch ((string)row[2]) | ||
585 | { | ||
586 | case "1": | ||
587 | application.DumpOnFailfast = ComPlus.YesNoType.yes; | ||
588 | break; | ||
589 | case "0": | ||
590 | application.DumpOnFailfast = ComPlus.YesNoType.no; | ||
591 | break; | ||
592 | default: | ||
593 | // TODO: Warning | ||
594 | break; | ||
595 | } | ||
596 | break; | ||
597 | case "DumpPath": | ||
598 | application.DumpPath = (string)row[2]; | ||
599 | break; | ||
600 | case "EventsEnabled": | ||
601 | switch ((string)row[2]) | ||
602 | { | ||
603 | case "1": | ||
604 | application.EventsEnabled = ComPlus.YesNoType.yes; | ||
605 | break; | ||
606 | case "0": | ||
607 | application.EventsEnabled = ComPlus.YesNoType.no; | ||
608 | break; | ||
609 | default: | ||
610 | // TODO: Warning | ||
611 | break; | ||
612 | } | ||
613 | break; | ||
614 | case "Identity": | ||
615 | application.Identity = (string)row[2]; | ||
616 | break; | ||
617 | case "ImpersonationLevel": | ||
618 | switch ((string)row[2]) | ||
619 | { | ||
620 | case "1": | ||
621 | application.ImpersonationLevel = ComPlus.ComPlusApplication.ImpersonationLevelType.anonymous; | ||
622 | break; | ||
623 | case "2": | ||
624 | application.ImpersonationLevel = ComPlus.ComPlusApplication.ImpersonationLevelType.identify; | ||
625 | break; | ||
626 | case "3": | ||
627 | application.ImpersonationLevel = ComPlus.ComPlusApplication.ImpersonationLevelType.impersonate; | ||
628 | break; | ||
629 | case "4": | ||
630 | application.ImpersonationLevel = ComPlus.ComPlusApplication.ImpersonationLevelType.@delegate; | ||
631 | break; | ||
632 | default: | ||
633 | // TODO: Warning | ||
634 | break; | ||
635 | } | ||
636 | break; | ||
637 | case "IsEnabled": | ||
638 | switch ((string)row[2]) | ||
639 | { | ||
640 | case "1": | ||
641 | application.IsEnabled = ComPlus.YesNoType.yes; | ||
642 | break; | ||
643 | case "0": | ||
644 | application.IsEnabled = ComPlus.YesNoType.no; | ||
645 | break; | ||
646 | default: | ||
647 | // TODO: Warning | ||
648 | break; | ||
649 | } | ||
650 | break; | ||
651 | case "MaxDumpCount": | ||
652 | int maxDumpCount; | ||
653 | if (Int32.TryParse((string)row[2], out maxDumpCount)) | ||
654 | { | ||
655 | application.MaxDumpCount = maxDumpCount; | ||
656 | } | ||
657 | else | ||
658 | { | ||
659 | // TODO: Warning | ||
660 | } | ||
661 | break; | ||
662 | case "Password": | ||
663 | application.Password = (string)row[2]; | ||
664 | break; | ||
665 | case "QCAuthenticateMsgs": | ||
666 | switch ((string)row[2]) | ||
667 | { | ||
668 | case "0": | ||
669 | application.QCAuthenticateMsgs = ComPlus.ComPlusApplication.QCAuthenticateMsgsType.secureApps; | ||
670 | break; | ||
671 | case "1": | ||
672 | application.QCAuthenticateMsgs = ComPlus.ComPlusApplication.QCAuthenticateMsgsType.off; | ||
673 | break; | ||
674 | case "2": | ||
675 | application.QCAuthenticateMsgs = ComPlus.ComPlusApplication.QCAuthenticateMsgsType.on; | ||
676 | break; | ||
677 | default: | ||
678 | // TODO: Warning | ||
679 | break; | ||
680 | } | ||
681 | break; | ||
682 | case "QCListenerMaxThreads": | ||
683 | int qcListenerMaxThreads; | ||
684 | if (Int32.TryParse((string)row[2], out qcListenerMaxThreads)) | ||
685 | { | ||
686 | application.QCListenerMaxThreads = qcListenerMaxThreads; | ||
687 | } | ||
688 | else | ||
689 | { | ||
690 | // TODO: Warning | ||
691 | } | ||
692 | break; | ||
693 | case "QueueListenerEnabled": | ||
694 | switch ((string)row[2]) | ||
695 | { | ||
696 | case "1": | ||
697 | application.QueueListenerEnabled = ComPlus.YesNoType.yes; | ||
698 | break; | ||
699 | case "0": | ||
700 | application.QueueListenerEnabled = ComPlus.YesNoType.no; | ||
701 | break; | ||
702 | default: | ||
703 | // TODO: Warning | ||
704 | break; | ||
705 | } | ||
706 | break; | ||
707 | case "QueuingEnabled": | ||
708 | switch ((string)row[2]) | ||
709 | { | ||
710 | case "1": | ||
711 | application.QueuingEnabled = ComPlus.YesNoType.yes; | ||
712 | break; | ||
713 | case "0": | ||
714 | application.QueuingEnabled = ComPlus.YesNoType.no; | ||
715 | break; | ||
716 | default: | ||
717 | // TODO: Warning | ||
718 | break; | ||
719 | } | ||
720 | break; | ||
721 | case "RecycleActivationLimit": | ||
722 | int recycleActivationLimit; | ||
723 | if (Int32.TryParse((string)row[2], out recycleActivationLimit)) | ||
724 | { | ||
725 | application.RecycleActivationLimit = recycleActivationLimit; | ||
726 | } | ||
727 | else | ||
728 | { | ||
729 | // TODO: Warning | ||
730 | } | ||
731 | break; | ||
732 | case "RecycleCallLimit": | ||
733 | int recycleCallLimit; | ||
734 | if (Int32.TryParse((string)row[2], out recycleCallLimit)) | ||
735 | { | ||
736 | application.RecycleCallLimit = recycleCallLimit; | ||
737 | } | ||
738 | else | ||
739 | { | ||
740 | // TODO: Warning | ||
741 | } | ||
742 | break; | ||
743 | case "RecycleExpirationTimeout": | ||
744 | int recycleExpirationTimeout; | ||
745 | if (Int32.TryParse((string)row[2], out recycleExpirationTimeout)) | ||
746 | { | ||
747 | application.RecycleExpirationTimeout = recycleExpirationTimeout; | ||
748 | } | ||
749 | else | ||
750 | { | ||
751 | // TODO: Warning | ||
752 | } | ||
753 | break; | ||
754 | case "RecycleLifetimeLimit": | ||
755 | int recycleLifetimeLimit; | ||
756 | if (Int32.TryParse((string)row[2], out recycleLifetimeLimit)) | ||
757 | { | ||
758 | application.RecycleLifetimeLimit = recycleLifetimeLimit; | ||
759 | } | ||
760 | else | ||
761 | { | ||
762 | // TODO: Warning | ||
763 | } | ||
764 | break; | ||
765 | case "RecycleMemoryLimit": | ||
766 | int recycleMemoryLimit; | ||
767 | if (Int32.TryParse((string)row[2], out recycleMemoryLimit)) | ||
768 | { | ||
769 | application.RecycleMemoryLimit = recycleMemoryLimit; | ||
770 | } | ||
771 | else | ||
772 | { | ||
773 | // TODO: Warning | ||
774 | } | ||
775 | break; | ||
776 | case "Replicable": | ||
777 | switch ((string)row[2]) | ||
778 | { | ||
779 | case "1": | ||
780 | application.Replicable = ComPlus.YesNoType.yes; | ||
781 | break; | ||
782 | case "0": | ||
783 | application.Replicable = ComPlus.YesNoType.no; | ||
784 | break; | ||
785 | default: | ||
786 | // TODO: Warning | ||
787 | break; | ||
788 | } | ||
789 | break; | ||
790 | case "RunForever": | ||
791 | switch ((string)row[2]) | ||
792 | { | ||
793 | case "1": | ||
794 | application.RunForever = ComPlus.YesNoType.yes; | ||
795 | break; | ||
796 | case "0": | ||
797 | application.RunForever = ComPlus.YesNoType.no; | ||
798 | break; | ||
799 | default: | ||
800 | // TODO: Warning | ||
801 | break; | ||
802 | } | ||
803 | break; | ||
804 | case "ShutdownAfter": | ||
805 | int shutdownAfter; | ||
806 | if (Int32.TryParse((string)row[2], out shutdownAfter)) | ||
807 | { | ||
808 | application.ShutdownAfter = shutdownAfter; | ||
809 | } | ||
810 | else | ||
811 | { | ||
812 | // TODO: Warning | ||
813 | } | ||
814 | break; | ||
815 | case "SoapActivated": | ||
816 | switch ((string)row[2]) | ||
817 | { | ||
818 | case "1": | ||
819 | application.SoapActivated = ComPlus.YesNoType.yes; | ||
820 | break; | ||
821 | case "0": | ||
822 | application.SoapActivated = ComPlus.YesNoType.no; | ||
823 | break; | ||
824 | default: | ||
825 | // TODO: Warning | ||
826 | break; | ||
827 | } | ||
828 | break; | ||
829 | case "SoapBaseUrl": | ||
830 | application.SoapBaseUrl = (string)row[2]; | ||
831 | break; | ||
832 | case "SoapMailTo": | ||
833 | application.SoapMailTo = (string)row[2]; | ||
834 | break; | ||
835 | case "SoapVRoot": | ||
836 | application.SoapVRoot = (string)row[2]; | ||
837 | break; | ||
838 | case "SRPEnabled": | ||
839 | switch ((string)row[2]) | ||
840 | { | ||
841 | case "1": | ||
842 | application.SRPEnabled = ComPlus.YesNoType.yes; | ||
843 | break; | ||
844 | case "0": | ||
845 | application.SRPEnabled = ComPlus.YesNoType.no; | ||
846 | break; | ||
847 | default: | ||
848 | // TODO: Warning | ||
849 | break; | ||
850 | } | ||
851 | break; | ||
852 | case "SRPTrustLevel": | ||
853 | switch ((string)row[2]) | ||
854 | { | ||
855 | case "0": | ||
856 | application.SRPTrustLevel = ComPlus.ComPlusApplication.SRPTrustLevelType.disallowed; | ||
857 | break; | ||
858 | case "262144": | ||
859 | application.SRPTrustLevel = ComPlus.ComPlusApplication.SRPTrustLevelType.fullyTrusted; | ||
860 | break; | ||
861 | default: | ||
862 | // TODO: Warning | ||
863 | break; | ||
864 | } | ||
865 | break; | ||
866 | default: | ||
867 | // TODO: Warning | ||
868 | break; | ||
869 | } | ||
870 | } | ||
871 | } | ||
872 | |||
873 | /// <summary> | ||
874 | /// Decompile the ComPlusApplicationRole table. | ||
875 | /// </summary> | ||
876 | /// <param name="table">The table to decompile.</param> | ||
877 | private void DecompileComPlusApplicationRoleTable(Table table) | ||
878 | { | ||
879 | foreach (Row row in table.Rows) | ||
880 | { | ||
881 | ComPlus.ComPlusApplicationRole applicationRole = new ComPlus.ComPlusApplicationRole(); | ||
882 | |||
883 | applicationRole.Id = (string)row[0]; | ||
884 | applicationRole.Application = (string)row[1]; | ||
885 | |||
886 | if (null != row[3]) | ||
887 | { | ||
888 | applicationRole.Name = (string)row[3]; | ||
889 | } | ||
890 | |||
891 | if (null != row[2]) | ||
892 | { | ||
893 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
894 | if (null != component) | ||
895 | { | ||
896 | component.AddChild(applicationRole); | ||
897 | } | ||
898 | else | ||
899 | { | ||
900 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
901 | } | ||
902 | } | ||
903 | else | ||
904 | { | ||
905 | this.Core.RootElement.AddChild(applicationRole); | ||
906 | } | ||
907 | this.Core.IndexElement(row, applicationRole); | ||
908 | } | ||
909 | } | ||
910 | |||
911 | /// <summary> | ||
912 | /// Decompile the ComPlusApplicationRoleProperty table. | ||
913 | /// </summary> | ||
914 | /// <param name="table">The table to decompile.</param> | ||
915 | private void DecompileComPlusApplicationRolePropertyTable(Table table) | ||
916 | { | ||
917 | foreach (Row row in table.Rows) | ||
918 | { | ||
919 | ComPlus.ComPlusApplicationRole applicationRole = (ComPlus.ComPlusApplicationRole)this.Core.GetIndexedElement("ComPlusApplicationRole", (string)row[0]); | ||
920 | if (null == applicationRole) | ||
921 | { | ||
922 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "ApplicationRole_", (string)row[0], "ComPlusApplicationRole")); | ||
923 | } | ||
924 | |||
925 | switch ((string)row[1]) | ||
926 | { | ||
927 | case "Description": | ||
928 | applicationRole.Description = (string)row[2]; | ||
929 | break; | ||
930 | default: | ||
931 | // TODO: Warning | ||
932 | break; | ||
933 | } | ||
934 | } | ||
935 | } | ||
936 | |||
937 | /// <summary> | ||
938 | /// Decompile the ComPlusUserInApplicationRole table. | ||
939 | /// </summary> | ||
940 | /// <param name="table">The table to decompile.</param> | ||
941 | private void DecompileComPlusUserInApplicationRoleTable(Table table) | ||
942 | { | ||
943 | foreach (Row row in table.Rows) | ||
944 | { | ||
945 | ComPlus.ComPlusUserInApplicationRole userInApplicationRole = new ComPlus.ComPlusUserInApplicationRole(); | ||
946 | |||
947 | userInApplicationRole.Id = (string)row[0]; | ||
948 | userInApplicationRole.ApplicationRole = (string)row[1]; | ||
949 | userInApplicationRole.User = (string)row[3]; | ||
950 | |||
951 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
952 | if (null != component) | ||
953 | { | ||
954 | component.AddChild(userInApplicationRole); | ||
955 | } | ||
956 | else | ||
957 | { | ||
958 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
959 | } | ||
960 | } | ||
961 | } | ||
962 | |||
963 | /// <summary> | ||
964 | /// Decompile the ComPlusGroupInApplicationRole table. | ||
965 | /// </summary> | ||
966 | /// <param name="table">The table to decompile.</param> | ||
967 | private void DecompileComPlusGroupInApplicationRoleTable(Table table) | ||
968 | { | ||
969 | foreach (Row row in table.Rows) | ||
970 | { | ||
971 | ComPlus.ComPlusGroupInApplicationRole groupInApplicationRole = new ComPlus.ComPlusGroupInApplicationRole(); | ||
972 | |||
973 | groupInApplicationRole.Id = (string)row[0]; | ||
974 | groupInApplicationRole.ApplicationRole = (string)row[1]; | ||
975 | groupInApplicationRole.Group = (string)row[3]; | ||
976 | |||
977 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
978 | if (null != component) | ||
979 | { | ||
980 | component.AddChild(groupInApplicationRole); | ||
981 | } | ||
982 | else | ||
983 | { | ||
984 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
985 | } | ||
986 | } | ||
987 | } | ||
988 | |||
989 | /// <summary> | ||
990 | /// Decompile the ComPlusAssembly table. | ||
991 | /// </summary> | ||
992 | /// <param name="table">The table to decompile.</param> | ||
993 | private void DecompileComPlusAssemblyTable(Table table) | ||
994 | { | ||
995 | foreach (Row row in table.Rows) | ||
996 | { | ||
997 | ComPlus.ComPlusAssembly assembly = new ComPlus.ComPlusAssembly(); | ||
998 | |||
999 | assembly.Id = (string)row[0]; | ||
1000 | assembly.Application = (string)row[1]; | ||
1001 | |||
1002 | if (null != row[3]) | ||
1003 | { | ||
1004 | assembly.AssemblyName = (string)row[3]; | ||
1005 | } | ||
1006 | |||
1007 | if (null != row[4]) | ||
1008 | { | ||
1009 | assembly.DllPath = (string)row[4]; | ||
1010 | } | ||
1011 | |||
1012 | if (null != row[5]) | ||
1013 | { | ||
1014 | assembly.TlbPath = (string)row[5]; | ||
1015 | } | ||
1016 | |||
1017 | if (null != row[6]) | ||
1018 | { | ||
1019 | assembly.PSDllPath = (string)row[6]; | ||
1020 | } | ||
1021 | |||
1022 | int attributes = (int)row[7]; | ||
1023 | |||
1024 | if (0 != (attributes & (int)ComPlusCompiler.CpiAssemblyAttributes.EventClass)) | ||
1025 | { | ||
1026 | assembly.EventClass = ComPlus.YesNoType.yes; | ||
1027 | } | ||
1028 | |||
1029 | if (0 != (attributes & (int)ComPlusCompiler.CpiAssemblyAttributes.DotNetAssembly)) | ||
1030 | { | ||
1031 | assembly.Type = ComPlus.ComPlusAssembly.TypeType.net; | ||
1032 | } | ||
1033 | |||
1034 | if (0 != (attributes & (int)ComPlusCompiler.CpiAssemblyAttributes.DllPathFromGAC)) | ||
1035 | { | ||
1036 | assembly.DllPathFromGAC = ComPlus.YesNoType.yes; | ||
1037 | } | ||
1038 | |||
1039 | if (0 != (attributes & (int)ComPlusCompiler.CpiAssemblyAttributes.RegisterInCommit)) | ||
1040 | { | ||
1041 | assembly.RegisterInCommit = ComPlus.YesNoType.yes; | ||
1042 | } | ||
1043 | |||
1044 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
1045 | if (null != component) | ||
1046 | { | ||
1047 | component.AddChild(assembly); | ||
1048 | } | ||
1049 | else | ||
1050 | { | ||
1051 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
1052 | } | ||
1053 | this.Core.IndexElement(row, assembly); | ||
1054 | } | ||
1055 | } | ||
1056 | |||
1057 | /// <summary> | ||
1058 | /// Decompile the ComPlusAssemblyDependency table. | ||
1059 | /// </summary> | ||
1060 | /// <param name="table">The table to decompile.</param> | ||
1061 | private void DecompileComPlusAssemblyDependencyTable(Table table) | ||
1062 | { | ||
1063 | foreach (Row row in table.Rows) | ||
1064 | { | ||
1065 | ComPlus.ComPlusAssemblyDependency assemblyDependency = new ComPlus.ComPlusAssemblyDependency(); | ||
1066 | |||
1067 | assemblyDependency.RequiredAssembly = (string)row[1]; | ||
1068 | |||
1069 | ComPlus.ComPlusAssembly assembly = (ComPlus.ComPlusAssembly)this.Core.GetIndexedElement("ComPlusAssembly", (string)row[0]); | ||
1070 | if (null != assembly) | ||
1071 | { | ||
1072 | assembly.AddChild(assemblyDependency); | ||
1073 | } | ||
1074 | else | ||
1075 | { | ||
1076 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Assembly_", (string)row[0], "ComPlusAssembly")); | ||
1077 | } | ||
1078 | } | ||
1079 | } | ||
1080 | |||
1081 | /// <summary> | ||
1082 | /// Decompile the ComPlusComponent table. | ||
1083 | /// </summary> | ||
1084 | /// <param name="table">The table to decompile.</param> | ||
1085 | private void DecompileComPlusComponentTable(Table table) | ||
1086 | { | ||
1087 | foreach (Row row in table.Rows) | ||
1088 | { | ||
1089 | ComPlus.ComPlusComponent comPlusComponent = new ComPlus.ComPlusComponent(); | ||
1090 | |||
1091 | comPlusComponent.Id = (string)row[0]; | ||
1092 | |||
1093 | try | ||
1094 | { | ||
1095 | Guid clsid = new Guid((string)row[2]); | ||
1096 | comPlusComponent.CLSID = clsid.ToString().ToUpper(); | ||
1097 | } | ||
1098 | catch | ||
1099 | { | ||
1100 | // TODO: Warning | ||
1101 | } | ||
1102 | |||
1103 | ComPlus.ComPlusAssembly assembly = (ComPlus.ComPlusAssembly)this.Core.GetIndexedElement("ComPlusAssembly", (string)row[1]); | ||
1104 | if (null != assembly) | ||
1105 | { | ||
1106 | assembly.AddChild(comPlusComponent); | ||
1107 | } | ||
1108 | else | ||
1109 | { | ||
1110 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Assembly_", (string)row[1], "ComPlusAssembly")); | ||
1111 | } | ||
1112 | this.Core.IndexElement(row, comPlusComponent); | ||
1113 | } | ||
1114 | } | ||
1115 | |||
1116 | /// <summary> | ||
1117 | /// Decompile the ComPlusComponentProperty table. | ||
1118 | /// </summary> | ||
1119 | /// <param name="table">The table to decompile.</param> | ||
1120 | private void DecompileComPlusComponentPropertyTable(Table table) | ||
1121 | { | ||
1122 | foreach (Row row in table.Rows) | ||
1123 | { | ||
1124 | ComPlus.ComPlusComponent comPlusComponent = (ComPlus.ComPlusComponent)this.Core.GetIndexedElement("ComPlusComponent", (string)row[0]); | ||
1125 | if (null == comPlusComponent) | ||
1126 | { | ||
1127 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "ComPlusComponent_", (string)row[0], "ComPlusComponent")); | ||
1128 | } | ||
1129 | |||
1130 | switch ((string)row[1]) | ||
1131 | { | ||
1132 | case "AllowInprocSubscribers": | ||
1133 | switch ((string)row[2]) | ||
1134 | { | ||
1135 | case "1": | ||
1136 | comPlusComponent.AllowInprocSubscribers = ComPlus.YesNoType.yes; | ||
1137 | break; | ||
1138 | case "0": | ||
1139 | comPlusComponent.AllowInprocSubscribers = ComPlus.YesNoType.no; | ||
1140 | break; | ||
1141 | default: | ||
1142 | // TODO: Warning | ||
1143 | break; | ||
1144 | } | ||
1145 | break; | ||
1146 | case "ComponentAccessChecksEnabled": | ||
1147 | switch ((string)row[2]) | ||
1148 | { | ||
1149 | case "1": | ||
1150 | comPlusComponent.ComponentAccessChecksEnabled = ComPlus.YesNoType.yes; | ||
1151 | break; | ||
1152 | case "0": | ||
1153 | comPlusComponent.ComponentAccessChecksEnabled = ComPlus.YesNoType.no; | ||
1154 | break; | ||
1155 | default: | ||
1156 | // TODO: Warning | ||
1157 | break; | ||
1158 | } | ||
1159 | break; | ||
1160 | case "ComponentTransactionTimeout": | ||
1161 | int componentTransactionTimeout; | ||
1162 | if (Int32.TryParse((string)row[2], out componentTransactionTimeout)) | ||
1163 | { | ||
1164 | comPlusComponent.ComponentTransactionTimeout = componentTransactionTimeout; | ||
1165 | } | ||
1166 | else | ||
1167 | { | ||
1168 | // TODO: Warning | ||
1169 | } | ||
1170 | break; | ||
1171 | case "ComponentTransactionTimeoutEnabled": | ||
1172 | switch ((string)row[2]) | ||
1173 | { | ||
1174 | case "1": | ||
1175 | comPlusComponent.ComponentTransactionTimeoutEnabled = ComPlus.YesNoType.yes; | ||
1176 | break; | ||
1177 | case "0": | ||
1178 | comPlusComponent.ComponentTransactionTimeoutEnabled = ComPlus.YesNoType.no; | ||
1179 | break; | ||
1180 | default: | ||
1181 | // TODO: Warning | ||
1182 | break; | ||
1183 | } | ||
1184 | break; | ||
1185 | case "COMTIIntrinsics": | ||
1186 | switch ((string)row[2]) | ||
1187 | { | ||
1188 | case "1": | ||
1189 | comPlusComponent.COMTIIntrinsics = ComPlus.YesNoType.yes; | ||
1190 | break; | ||
1191 | case "0": | ||
1192 | comPlusComponent.COMTIIntrinsics = ComPlus.YesNoType.no; | ||
1193 | break; | ||
1194 | default: | ||
1195 | // TODO: Warning | ||
1196 | break; | ||
1197 | } | ||
1198 | break; | ||
1199 | case "ConstructionEnabled": | ||
1200 | switch ((string)row[2]) | ||
1201 | { | ||
1202 | case "1": | ||
1203 | comPlusComponent.ConstructionEnabled = ComPlus.YesNoType.yes; | ||
1204 | break; | ||
1205 | case "0": | ||
1206 | comPlusComponent.ConstructionEnabled = ComPlus.YesNoType.no; | ||
1207 | break; | ||
1208 | default: | ||
1209 | // TODO: Warning | ||
1210 | break; | ||
1211 | } | ||
1212 | break; | ||
1213 | case "ConstructorString": | ||
1214 | comPlusComponent.ConstructorString = (string)row[2]; | ||
1215 | break; | ||
1216 | case "CreationTimeout": | ||
1217 | int creationTimeout; | ||
1218 | if (Int32.TryParse((string)row[2], out creationTimeout)) | ||
1219 | { | ||
1220 | comPlusComponent.CreationTimeout = creationTimeout; | ||
1221 | } | ||
1222 | else | ||
1223 | { | ||
1224 | // TODO: Warning | ||
1225 | } | ||
1226 | break; | ||
1227 | case "Description": | ||
1228 | comPlusComponent.Description = (string)row[2]; | ||
1229 | break; | ||
1230 | case "EventTrackingEnabled": | ||
1231 | switch ((string)row[2]) | ||
1232 | { | ||
1233 | case "1": | ||
1234 | comPlusComponent.EventTrackingEnabled = ComPlus.YesNoType.yes; | ||
1235 | break; | ||
1236 | case "0": | ||
1237 | comPlusComponent.EventTrackingEnabled = ComPlus.YesNoType.no; | ||
1238 | break; | ||
1239 | default: | ||
1240 | // TODO: Warning | ||
1241 | break; | ||
1242 | } | ||
1243 | break; | ||
1244 | case "ExceptionClass": | ||
1245 | comPlusComponent.ExceptionClass = (string)row[2]; | ||
1246 | break; | ||
1247 | case "FireInParallel": | ||
1248 | switch ((string)row[2]) | ||
1249 | { | ||
1250 | case "1": | ||
1251 | comPlusComponent.FireInParallel = ComPlus.YesNoType.yes; | ||
1252 | break; | ||
1253 | case "0": | ||
1254 | comPlusComponent.FireInParallel = ComPlus.YesNoType.no; | ||
1255 | break; | ||
1256 | default: | ||
1257 | // TODO: Warning | ||
1258 | break; | ||
1259 | } | ||
1260 | break; | ||
1261 | case "IISIntrinsics": | ||
1262 | switch ((string)row[2]) | ||
1263 | { | ||
1264 | case "1": | ||
1265 | comPlusComponent.IISIntrinsics = ComPlus.YesNoType.yes; | ||
1266 | break; | ||
1267 | case "0": | ||
1268 | comPlusComponent.IISIntrinsics = ComPlus.YesNoType.no; | ||
1269 | break; | ||
1270 | default: | ||
1271 | // TODO: Warning | ||
1272 | break; | ||
1273 | } | ||
1274 | break; | ||
1275 | case "InitializesServerApplication": | ||
1276 | switch ((string)row[2]) | ||
1277 | { | ||
1278 | case "1": | ||
1279 | comPlusComponent.InitializesServerApplication = ComPlus.YesNoType.yes; | ||
1280 | break; | ||
1281 | case "0": | ||
1282 | comPlusComponent.InitializesServerApplication = ComPlus.YesNoType.no; | ||
1283 | break; | ||
1284 | default: | ||
1285 | // TODO: Warning | ||
1286 | break; | ||
1287 | } | ||
1288 | break; | ||
1289 | case "IsEnabled": | ||
1290 | switch ((string)row[2]) | ||
1291 | { | ||
1292 | case "1": | ||
1293 | comPlusComponent.IsEnabled = ComPlus.YesNoType.yes; | ||
1294 | break; | ||
1295 | case "0": | ||
1296 | comPlusComponent.IsEnabled = ComPlus.YesNoType.no; | ||
1297 | break; | ||
1298 | default: | ||
1299 | // TODO: Warning | ||
1300 | break; | ||
1301 | } | ||
1302 | break; | ||
1303 | case "IsPrivateComponent": | ||
1304 | switch ((string)row[2]) | ||
1305 | { | ||
1306 | case "1": | ||
1307 | comPlusComponent.IsPrivateComponent = ComPlus.YesNoType.yes; | ||
1308 | break; | ||
1309 | case "0": | ||
1310 | comPlusComponent.IsPrivateComponent = ComPlus.YesNoType.no; | ||
1311 | break; | ||
1312 | default: | ||
1313 | // TODO: Warning | ||
1314 | break; | ||
1315 | } | ||
1316 | break; | ||
1317 | case "JustInTimeActivation": | ||
1318 | switch ((string)row[2]) | ||
1319 | { | ||
1320 | case "1": | ||
1321 | comPlusComponent.JustInTimeActivation = ComPlus.YesNoType.yes; | ||
1322 | break; | ||
1323 | case "0": | ||
1324 | comPlusComponent.JustInTimeActivation = ComPlus.YesNoType.no; | ||
1325 | break; | ||
1326 | default: | ||
1327 | // TODO: Warning | ||
1328 | break; | ||
1329 | } | ||
1330 | break; | ||
1331 | case "LoadBalancingSupported": | ||
1332 | switch ((string)row[2]) | ||
1333 | { | ||
1334 | case "1": | ||
1335 | comPlusComponent.LoadBalancingSupported = ComPlus.YesNoType.yes; | ||
1336 | break; | ||
1337 | case "0": | ||
1338 | comPlusComponent.LoadBalancingSupported = ComPlus.YesNoType.no; | ||
1339 | break; | ||
1340 | default: | ||
1341 | // TODO: Warning | ||
1342 | break; | ||
1343 | } | ||
1344 | break; | ||
1345 | case "MaxPoolSize": | ||
1346 | int maxPoolSize; | ||
1347 | if (Int32.TryParse((string)row[2], out maxPoolSize)) | ||
1348 | { | ||
1349 | comPlusComponent.MaxPoolSize = maxPoolSize; | ||
1350 | } | ||
1351 | else | ||
1352 | { | ||
1353 | // TODO: Warning | ||
1354 | } | ||
1355 | break; | ||
1356 | case "MinPoolSize": | ||
1357 | int minPoolSize; | ||
1358 | if (Int32.TryParse((string)row[2], out minPoolSize)) | ||
1359 | { | ||
1360 | comPlusComponent.MinPoolSize = minPoolSize; | ||
1361 | } | ||
1362 | else | ||
1363 | { | ||
1364 | // TODO: Warning | ||
1365 | } | ||
1366 | break; | ||
1367 | case "MultiInterfacePublisherFilterCLSID": | ||
1368 | comPlusComponent.MultiInterfacePublisherFilterCLSID = (string)row[2]; | ||
1369 | break; | ||
1370 | case "MustRunInClientContext": | ||
1371 | switch ((string)row[2]) | ||
1372 | { | ||
1373 | case "1": | ||
1374 | comPlusComponent.MustRunInClientContext = ComPlus.YesNoType.yes; | ||
1375 | break; | ||
1376 | case "0": | ||
1377 | comPlusComponent.MustRunInClientContext = ComPlus.YesNoType.no; | ||
1378 | break; | ||
1379 | default: | ||
1380 | // TODO: Warning | ||
1381 | break; | ||
1382 | } | ||
1383 | break; | ||
1384 | case "MustRunInDefaultContext": | ||
1385 | switch ((string)row[2]) | ||
1386 | { | ||
1387 | case "1": | ||
1388 | comPlusComponent.MustRunInDefaultContext = ComPlus.YesNoType.yes; | ||
1389 | break; | ||
1390 | case "0": | ||
1391 | comPlusComponent.MustRunInDefaultContext = ComPlus.YesNoType.no; | ||
1392 | break; | ||
1393 | default: | ||
1394 | // TODO: Warning | ||
1395 | break; | ||
1396 | } | ||
1397 | break; | ||
1398 | case "ObjectPoolingEnabled": | ||
1399 | switch ((string)row[2]) | ||
1400 | { | ||
1401 | case "1": | ||
1402 | comPlusComponent.ObjectPoolingEnabled = ComPlus.YesNoType.yes; | ||
1403 | break; | ||
1404 | case "0": | ||
1405 | comPlusComponent.ObjectPoolingEnabled = ComPlus.YesNoType.no; | ||
1406 | break; | ||
1407 | default: | ||
1408 | // TODO: Warning | ||
1409 | break; | ||
1410 | } | ||
1411 | break; | ||
1412 | case "PublisherID": | ||
1413 | comPlusComponent.PublisherID = (string)row[2]; | ||
1414 | break; | ||
1415 | case "SoapAssemblyName": | ||
1416 | comPlusComponent.SoapAssemblyName = (string)row[2]; | ||
1417 | break; | ||
1418 | case "SoapTypeName": | ||
1419 | comPlusComponent.SoapTypeName = (string)row[2]; | ||
1420 | break; | ||
1421 | case "Synchronization": | ||
1422 | switch ((string)row[2]) | ||
1423 | { | ||
1424 | case "0": | ||
1425 | comPlusComponent.Synchronization = ComPlus.ComPlusComponent.SynchronizationType.ignored; | ||
1426 | break; | ||
1427 | case "1": | ||
1428 | comPlusComponent.Synchronization = ComPlus.ComPlusComponent.SynchronizationType.none; | ||
1429 | break; | ||
1430 | case "2": | ||
1431 | comPlusComponent.Synchronization = ComPlus.ComPlusComponent.SynchronizationType.supported; | ||
1432 | break; | ||
1433 | case "3": | ||
1434 | comPlusComponent.Synchronization = ComPlus.ComPlusComponent.SynchronizationType.required; | ||
1435 | break; | ||
1436 | case "4": | ||
1437 | comPlusComponent.Synchronization = ComPlus.ComPlusComponent.SynchronizationType.requiresNew; | ||
1438 | break; | ||
1439 | default: | ||
1440 | // TODO: Warning | ||
1441 | break; | ||
1442 | } | ||
1443 | break; | ||
1444 | case "Transaction": | ||
1445 | switch ((string)row[2]) | ||
1446 | { | ||
1447 | case "0": | ||
1448 | comPlusComponent.Transaction = ComPlus.ComPlusComponent.TransactionType.ignored; | ||
1449 | break; | ||
1450 | case "1": | ||
1451 | comPlusComponent.Transaction = ComPlus.ComPlusComponent.TransactionType.none; | ||
1452 | break; | ||
1453 | case "2": | ||
1454 | comPlusComponent.Transaction = ComPlus.ComPlusComponent.TransactionType.supported; | ||
1455 | break; | ||
1456 | case "3": | ||
1457 | comPlusComponent.Transaction = ComPlus.ComPlusComponent.TransactionType.required; | ||
1458 | break; | ||
1459 | case "4": | ||
1460 | comPlusComponent.Transaction = ComPlus.ComPlusComponent.TransactionType.requiresNew; | ||
1461 | break; | ||
1462 | default: | ||
1463 | // TODO: Warning | ||
1464 | break; | ||
1465 | } | ||
1466 | break; | ||
1467 | case "TxIsolationLevel": | ||
1468 | switch ((string)row[2]) | ||
1469 | { | ||
1470 | case "0": | ||
1471 | comPlusComponent.TxIsolationLevel = ComPlus.ComPlusComponent.TxIsolationLevelType.any; | ||
1472 | break; | ||
1473 | case "1": | ||
1474 | comPlusComponent.TxIsolationLevel = ComPlus.ComPlusComponent.TxIsolationLevelType.readUnCommitted; | ||
1475 | break; | ||
1476 | case "2": | ||
1477 | comPlusComponent.TxIsolationLevel = ComPlus.ComPlusComponent.TxIsolationLevelType.readCommitted; | ||
1478 | break; | ||
1479 | case "3": | ||
1480 | comPlusComponent.TxIsolationLevel = ComPlus.ComPlusComponent.TxIsolationLevelType.repeatableRead; | ||
1481 | break; | ||
1482 | case "4": | ||
1483 | comPlusComponent.TxIsolationLevel = ComPlus.ComPlusComponent.TxIsolationLevelType.serializable; | ||
1484 | break; | ||
1485 | default: | ||
1486 | // TODO: Warning | ||
1487 | break; | ||
1488 | } | ||
1489 | break; | ||
1490 | default: | ||
1491 | // TODO: Warning | ||
1492 | break; | ||
1493 | } | ||
1494 | } | ||
1495 | } | ||
1496 | |||
1497 | /// <summary> | ||
1498 | /// Decompile the ComPlusRoleForComponent table. | ||
1499 | /// </summary> | ||
1500 | /// <param name="table">The table to decompile.</param> | ||
1501 | private void DecompileComPlusRoleForComponentTable(Table table) | ||
1502 | { | ||
1503 | foreach (Row row in table.Rows) | ||
1504 | { | ||
1505 | ComPlus.ComPlusRoleForComponent roleForComponent = new ComPlus.ComPlusRoleForComponent(); | ||
1506 | |||
1507 | roleForComponent.Id = (string)row[0]; | ||
1508 | roleForComponent.Component = (string)row[1]; | ||
1509 | roleForComponent.ApplicationRole = (string)row[2]; | ||
1510 | |||
1511 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[3]); | ||
1512 | if (null != component) | ||
1513 | { | ||
1514 | component.AddChild(roleForComponent); | ||
1515 | } | ||
1516 | else | ||
1517 | { | ||
1518 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[3], "Component")); | ||
1519 | } | ||
1520 | } | ||
1521 | } | ||
1522 | |||
1523 | /// <summary> | ||
1524 | /// Decompile the ComPlusInterface table. | ||
1525 | /// </summary> | ||
1526 | /// <param name="table">The table to decompile.</param> | ||
1527 | private void DecompileComPlusInterfaceTable(Table table) | ||
1528 | { | ||
1529 | foreach (Row row in table.Rows) | ||
1530 | { | ||
1531 | ComPlus.ComPlusInterface comPlusInterface = new ComPlus.ComPlusInterface(); | ||
1532 | |||
1533 | comPlusInterface.Id = (string)row[0]; | ||
1534 | |||
1535 | try | ||
1536 | { | ||
1537 | Guid iid = new Guid((string)row[2]); | ||
1538 | comPlusInterface.IID = iid.ToString().ToUpper(); | ||
1539 | } | ||
1540 | catch | ||
1541 | { | ||
1542 | // TODO: Warning | ||
1543 | } | ||
1544 | |||
1545 | ComPlus.ComPlusComponent comPlusComponent = (ComPlus.ComPlusComponent)this.Core.GetIndexedElement("ComPlusComponent", (string)row[1]); | ||
1546 | if (null != comPlusComponent) | ||
1547 | { | ||
1548 | comPlusComponent.AddChild(comPlusInterface); | ||
1549 | } | ||
1550 | else | ||
1551 | { | ||
1552 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "ComPlusComponent_", (string)row[1], "ComPlusComponent")); | ||
1553 | } | ||
1554 | this.Core.IndexElement(row, comPlusInterface); | ||
1555 | } | ||
1556 | } | ||
1557 | |||
1558 | /// <summary> | ||
1559 | /// Decompile the ComPlusInterfaceProperty table. | ||
1560 | /// </summary> | ||
1561 | /// <param name="table">The table to decompile.</param> | ||
1562 | private void DecompileComPlusInterfacePropertyTable(Table table) | ||
1563 | { | ||
1564 | foreach (Row row in table.Rows) | ||
1565 | { | ||
1566 | ComPlus.ComPlusInterface comPlusInterface = (ComPlus.ComPlusInterface)this.Core.GetIndexedElement("ComPlusInterface", (string)row[0]); | ||
1567 | if (null == comPlusInterface) | ||
1568 | { | ||
1569 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Interface_", (string)row[0], "ComPlusInterface")); | ||
1570 | } | ||
1571 | |||
1572 | switch ((string)row[1]) | ||
1573 | { | ||
1574 | case "Description": | ||
1575 | comPlusInterface.Description = (string)row[2]; | ||
1576 | break; | ||
1577 | case "QueuingEnabled": | ||
1578 | switch ((string)row[2]) | ||
1579 | { | ||
1580 | case "1": | ||
1581 | comPlusInterface.QueuingEnabled = ComPlus.YesNoType.yes; | ||
1582 | break; | ||
1583 | case "0": | ||
1584 | comPlusInterface.QueuingEnabled = ComPlus.YesNoType.no; | ||
1585 | break; | ||
1586 | default: | ||
1587 | // TODO: Warning | ||
1588 | break; | ||
1589 | } | ||
1590 | break; | ||
1591 | default: | ||
1592 | // TODO: Warning | ||
1593 | break; | ||
1594 | } | ||
1595 | } | ||
1596 | } | ||
1597 | |||
1598 | /// <summary> | ||
1599 | /// Decompile the ComPlusRoleForInterface table. | ||
1600 | /// </summary> | ||
1601 | /// <param name="table">The table to decompile.</param> | ||
1602 | private void DecompileComPlusRoleForInterfaceTable(Table table) | ||
1603 | { | ||
1604 | foreach (Row row in table.Rows) | ||
1605 | { | ||
1606 | ComPlus.ComPlusRoleForInterface roleForInterface = new ComPlus.ComPlusRoleForInterface(); | ||
1607 | |||
1608 | roleForInterface.Id = (string)row[0]; | ||
1609 | roleForInterface.Interface = (string)row[1]; | ||
1610 | roleForInterface.ApplicationRole = (string)row[2]; | ||
1611 | |||
1612 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[3]); | ||
1613 | if (null != component) | ||
1614 | { | ||
1615 | component.AddChild(roleForInterface); | ||
1616 | } | ||
1617 | else | ||
1618 | { | ||
1619 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[3], "Component")); | ||
1620 | } | ||
1621 | } | ||
1622 | } | ||
1623 | |||
1624 | /// <summary> | ||
1625 | /// Decompile the ComPlusMethod table. | ||
1626 | /// </summary> | ||
1627 | /// <param name="table">The table to decompile.</param> | ||
1628 | private void DecompileComPlusMethodTable(Table table) | ||
1629 | { | ||
1630 | foreach (Row row in table.Rows) | ||
1631 | { | ||
1632 | ComPlus.ComPlusMethod comPlusMethod = new ComPlus.ComPlusMethod(); | ||
1633 | |||
1634 | comPlusMethod.Id = (string)row[0]; | ||
1635 | |||
1636 | if (null != row[2]) | ||
1637 | { | ||
1638 | comPlusMethod.Index = (int)row[2]; | ||
1639 | } | ||
1640 | |||
1641 | if (null != row[3]) | ||
1642 | { | ||
1643 | comPlusMethod.Name = (string)row[3]; | ||
1644 | } | ||
1645 | |||
1646 | ComPlus.ComPlusInterface comPlusInterface = (ComPlus.ComPlusInterface)this.Core.GetIndexedElement("ComPlusInterface", (string)row[1]); | ||
1647 | if (null != comPlusInterface) | ||
1648 | { | ||
1649 | comPlusInterface.AddChild(comPlusMethod); | ||
1650 | } | ||
1651 | else | ||
1652 | { | ||
1653 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Interface_", (string)row[1], "ComPlusInterface")); | ||
1654 | } | ||
1655 | this.Core.IndexElement(row, comPlusMethod); | ||
1656 | } | ||
1657 | } | ||
1658 | |||
1659 | /// <summary> | ||
1660 | /// Decompile the ComPlusMethodProperty table. | ||
1661 | /// </summary> | ||
1662 | /// <param name="table">The table to decompile.</param> | ||
1663 | private void DecompileComPlusMethodPropertyTable(Table table) | ||
1664 | { | ||
1665 | foreach (Row row in table.Rows) | ||
1666 | { | ||
1667 | ComPlus.ComPlusMethod comPlusMethod = (ComPlus.ComPlusMethod)this.Core.GetIndexedElement("ComPlusMethod", (string)row[0]); | ||
1668 | if (null == comPlusMethod) | ||
1669 | { | ||
1670 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Method_", (string)row[0], "ComPlusMethod")); | ||
1671 | } | ||
1672 | |||
1673 | switch ((string)row[1]) | ||
1674 | { | ||
1675 | case "AutoComplete": | ||
1676 | switch ((string)row[2]) | ||
1677 | { | ||
1678 | case "1": | ||
1679 | comPlusMethod.AutoComplete = ComPlus.YesNoType.yes; | ||
1680 | break; | ||
1681 | case "0": | ||
1682 | comPlusMethod.AutoComplete = ComPlus.YesNoType.no; | ||
1683 | break; | ||
1684 | default: | ||
1685 | // TODO: Warning | ||
1686 | break; | ||
1687 | } | ||
1688 | break; | ||
1689 | case "Description": | ||
1690 | comPlusMethod.Description = (string)row[2]; | ||
1691 | break; | ||
1692 | default: | ||
1693 | // TODO: Warning | ||
1694 | break; | ||
1695 | } | ||
1696 | } | ||
1697 | } | ||
1698 | |||
1699 | /// <summary> | ||
1700 | /// Decompile the ComPlusRoleForMethod table. | ||
1701 | /// </summary> | ||
1702 | /// <param name="table">The table to decompile.</param> | ||
1703 | private void DecompileComPlusRoleForMethodTable(Table table) | ||
1704 | { | ||
1705 | foreach (Row row in table.Rows) | ||
1706 | { | ||
1707 | ComPlus.ComPlusRoleForMethod roleForMethod = new ComPlus.ComPlusRoleForMethod(); | ||
1708 | |||
1709 | roleForMethod.Id = (string)row[0]; | ||
1710 | roleForMethod.Method = (string)row[1]; | ||
1711 | roleForMethod.ApplicationRole = (string)row[2]; | ||
1712 | |||
1713 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[3]); | ||
1714 | if (null != component) | ||
1715 | { | ||
1716 | component.AddChild(roleForMethod); | ||
1717 | } | ||
1718 | else | ||
1719 | { | ||
1720 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[3], "Component")); | ||
1721 | } | ||
1722 | } | ||
1723 | } | ||
1724 | |||
1725 | /// <summary> | ||
1726 | /// Decompile the ComPlusSubscription table. | ||
1727 | /// </summary> | ||
1728 | /// <param name="table">The table to decompile.</param> | ||
1729 | private void DecompileComPlusSubscriptionTable(Table table) | ||
1730 | { | ||
1731 | foreach (Row row in table.Rows) | ||
1732 | { | ||
1733 | ComPlus.ComPlusSubscription subscription = new ComPlus.ComPlusSubscription(); | ||
1734 | |||
1735 | subscription.Id = (string)row[0]; | ||
1736 | subscription.Component = (string)row[1]; | ||
1737 | subscription.SubscriptionId = (string)row[3]; | ||
1738 | subscription.Name = (string)row[4]; | ||
1739 | subscription.EventCLSID = (string)row[5]; | ||
1740 | subscription.PublisherID = (string)row[6]; | ||
1741 | |||
1742 | Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[2]); | ||
1743 | if (null != component) | ||
1744 | { | ||
1745 | component.AddChild(subscription); | ||
1746 | } | ||
1747 | else | ||
1748 | { | ||
1749 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component")); | ||
1750 | } | ||
1751 | this.Core.IndexElement(row, subscription); | ||
1752 | } | ||
1753 | } | ||
1754 | |||
1755 | /// <summary> | ||
1756 | /// Decompile the ComPlusSubscriptionProperty table. | ||
1757 | /// </summary> | ||
1758 | /// <param name="table">The table to decompile.</param> | ||
1759 | private void DecompileComPlusSubscriptionPropertyTable(Table table) | ||
1760 | { | ||
1761 | foreach (Row row in table.Rows) | ||
1762 | { | ||
1763 | ComPlus.ComPlusSubscription subscription = (ComPlus.ComPlusSubscription)this.Core.GetIndexedElement("ComPlusSubscription", (string)row[0]); | ||
1764 | if (null == subscription) | ||
1765 | { | ||
1766 | this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Subscription_", (string)row[0], "ComPlusSubscription")); | ||
1767 | } | ||
1768 | |||
1769 | switch ((string)row[1]) | ||
1770 | { | ||
1771 | case "Description": | ||
1772 | subscription.Description = (string)row[2]; | ||
1773 | break; | ||
1774 | case "Enabled": | ||
1775 | switch ((string)row[2]) | ||
1776 | { | ||
1777 | case "1": | ||
1778 | subscription.Enabled = ComPlus.YesNoType.yes; | ||
1779 | break; | ||
1780 | case "0": | ||
1781 | subscription.Enabled = ComPlus.YesNoType.no; | ||
1782 | break; | ||
1783 | default: | ||
1784 | // TODO: Warning | ||
1785 | break; | ||
1786 | } | ||
1787 | break; | ||
1788 | case "EventClassPartitionID": | ||
1789 | subscription.EventClassPartitionID = (string)row[2]; | ||
1790 | break; | ||
1791 | case "FilterCriteria": | ||
1792 | subscription.FilterCriteria = (string)row[2]; | ||
1793 | break; | ||
1794 | case "InterfaceID": | ||
1795 | subscription.InterfaceID = (string)row[2]; | ||
1796 | break; | ||
1797 | case "MachineName": | ||
1798 | subscription.MachineName = (string)row[2]; | ||
1799 | break; | ||
1800 | case "MethodName": | ||
1801 | subscription.MethodName = (string)row[2]; | ||
1802 | break; | ||
1803 | case "PerUser": | ||
1804 | switch ((string)row[2]) | ||
1805 | { | ||
1806 | case "1": | ||
1807 | subscription.PerUser = ComPlus.YesNoType.yes; | ||
1808 | break; | ||
1809 | case "0": | ||
1810 | subscription.PerUser = ComPlus.YesNoType.no; | ||
1811 | break; | ||
1812 | default: | ||
1813 | // TODO: Warning | ||
1814 | break; | ||
1815 | } | ||
1816 | break; | ||
1817 | case "Queued": | ||
1818 | switch ((string)row[2]) | ||
1819 | { | ||
1820 | case "1": | ||
1821 | subscription.Queued = ComPlus.YesNoType.yes; | ||
1822 | break; | ||
1823 | case "0": | ||
1824 | subscription.Queued = ComPlus.YesNoType.no; | ||
1825 | break; | ||
1826 | default: | ||
1827 | // TODO: Warning | ||
1828 | break; | ||
1829 | } | ||
1830 | break; | ||
1831 | case "SubscriberMoniker": | ||
1832 | subscription.SubscriberMoniker = (string)row[2]; | ||
1833 | break; | ||
1834 | case "UserName": | ||
1835 | subscription.UserName = (string)row[2]; | ||
1836 | break; | ||
1837 | default: | ||
1838 | // TODO: Warning | ||
1839 | break; | ||
1840 | } | ||
1841 | } | ||
1842 | } | ||
1843 | } | ||
1844 | #endif | ||
1845 | } | ||