aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Compiler_EmbeddedUI.cs
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-04-11 21:49:09 +1000
committerSean Hall <r.sean.hall@gmail.com>2020-04-12 12:46:21 +1000
commit6d8b6f79b44b6a41a630aa3aad5a3c7f16701798 (patch)
treeb82ede9934cb7777a19e74a912c68481e76c21cd /src/WixToolset.Core/Compiler_EmbeddedUI.cs
parentdf69d4172d3117d8b66ba51fa5ae7f4be538700d (diff)
downloadwix-6d8b6f79b44b6a41a630aa3aad5a3c7f16701798.tar.gz
wix-6d8b6f79b44b6a41a630aa3aad5a3c7f16701798.tar.bz2
wix-6d8b6f79b44b6a41a630aa3aad5a3c7f16701798.zip
General cleanup.
Try not to send strings to specify the tuple or table. Try to avoid using the Set method on tuples. Always create new tuples and add them to the section in the same line.
Diffstat (limited to 'src/WixToolset.Core/Compiler_EmbeddedUI.cs')
-rw-r--r--src/WixToolset.Core/Compiler_EmbeddedUI.cs16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/WixToolset.Core/Compiler_EmbeddedUI.cs b/src/WixToolset.Core/Compiler_EmbeddedUI.cs
index e71c2f56..706fe6e9 100644
--- a/src/WixToolset.Core/Compiler_EmbeddedUI.cs
+++ b/src/WixToolset.Core/Compiler_EmbeddedUI.cs
@@ -42,7 +42,7 @@ namespace WixToolset.Core
42 } 42 }
43 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 43 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
44 type = 0x2; 44 type = 0x2;
45 this.Core.CreateSimpleReference(sourceLineNumbers, "Binary", source); // add a reference to the appropriate Binary 45 this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, source); // add a reference to the appropriate Binary
46 break; 46 break;
47 case "CommandLine": 47 case "CommandLine":
48 commandLine = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 48 commandLine = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
@@ -54,7 +54,7 @@ namespace WixToolset.Core
54 } 54 }
55 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 55 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
56 type = 0x12; 56 type = 0x12;
57 this.Core.CreateSimpleReference(sourceLineNumbers, "File", source); // add a reference to the appropriate File 57 this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.File, source); // add a reference to the appropriate File
58 break; 58 break;
59 case "PropertySource": 59 case "PropertySource":
60 if (null != source) 60 if (null != source)
@@ -317,16 +317,14 @@ namespace WixToolset.Core
317 317
318 if (!this.Core.EncounteredError) 318 if (!this.Core.EncounteredError)
319 { 319 {
320 var tuple = new MsiEmbeddedUITuple(sourceLineNumbers, id) 320 this.Core.AddTuple(new MsiEmbeddedUITuple(sourceLineNumbers, id)
321 { 321 {
322 FileName = name, 322 FileName = name,
323 EntryPoint = true, 323 EntryPoint = true,
324 SupportsBasicUI = supportsBasicUI, 324 SupportsBasicUI = supportsBasicUI,
325 MessageFilter = messageFilter, 325 MessageFilter = messageFilter,
326 Source = sourceFile 326 Source = sourceFile
327 }; 327 });
328
329 this.Core.AddTuple(tuple);
330 } 328 }
331 } 329 }
332 330
@@ -406,13 +404,11 @@ namespace WixToolset.Core
406 404
407 if (!this.Core.EncounteredError) 405 if (!this.Core.EncounteredError)
408 { 406 {
409 var tuple = new MsiEmbeddedUITuple(sourceLineNumbers, id) 407 this.Core.AddTuple(new MsiEmbeddedUITuple(sourceLineNumbers, id)
410 { 408 {
411 FileName = name, 409 FileName = name,
412 Source = sourceFile 410 Source = sourceFile
413 }; 411 });
414
415 this.Core.AddTuple(tuple);
416 } 412 }
417 } 413 }
418 } 414 }