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