aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Compiler_Patch.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_Patch.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_Patch.cs')
-rw-r--r--src/WixToolset.Core/Compiler_Patch.cs16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/WixToolset.Core/Compiler_Patch.cs b/src/WixToolset.Core/Compiler_Patch.cs
index f8d05132..f7481143 100644
--- a/src/WixToolset.Core/Compiler_Patch.cs
+++ b/src/WixToolset.Core/Compiler_Patch.cs
@@ -197,14 +197,12 @@ namespace WixToolset.Core
197 197
198 if (!this.Core.EncounteredError) 198 if (!this.Core.EncounteredError)
199 { 199 {
200 var tuple = new WixPatchIdTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, patchId)) 200 this.Core.AddTuple(new WixPatchIdTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, patchId))
201 { 201 {
202 ClientPatchId = clientPatchId, 202 ClientPatchId = clientPatchId,
203 OptimizePatchSizeForLargeFiles = optimizePatchSizeForLargeFiles, 203 OptimizePatchSizeForLargeFiles = optimizePatchSizeForLargeFiles,
204 ApiPatchingSymbolFlags = apiPatchingSymbolFlags 204 ApiPatchingSymbolFlags = apiPatchingSymbolFlags,
205 }; 205 });
206
207 this.Core.AddTuple(tuple);
208 206
209 if (allowRemoval) 207 if (allowRemoval)
210 { 208 {
@@ -427,15 +425,13 @@ namespace WixToolset.Core
427 425
428 if (!this.Core.EncounteredError) 426 if (!this.Core.EncounteredError)
429 { 427 {
430 var tuple = new MsiPatchSequenceTuple(sourceLineNumbers) 428 this.Core.AddTuple(new MsiPatchSequenceTuple(sourceLineNumbers)
431 { 429 {
432 PatchFamily = id.Id, 430 PatchFamily = id.Id,
433 ProductCode = productCode, 431 ProductCode = productCode,
434 Sequence = version, 432 Sequence = version,
435 Attributes = attributes 433 Attributes = attributes
436 }; 434 });
437
438 this.Core.AddTuple(tuple);
439 435
440 if (ComplexReferenceParentType.Unknown != parentType) 436 if (ComplexReferenceParentType.Unknown != parentType)
441 { 437 {
@@ -536,7 +532,7 @@ namespace WixToolset.Core
536 { 532 {
537 case "Id": 533 case "Id":
538 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 534 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
539 this.Core.CreateSimpleReference(sourceLineNumbers, "WixPatchFamilyGroup", id); 535 this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixPatchFamilyGroup, id);
540 break; 536 break;
541 default: 537 default:
542 this.Core.UnexpectedAttribute(node, attrib); 538 this.Core.UnexpectedAttribute(node, attrib);