aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2020-07-05 23:08:20 -0700
committerRob Mensching <rob@firegiant.com>2020-07-08 15:18:09 -0700
commit7b583330fd42356930bdc5a28820e546f6ca45a4 (patch)
tree3166934d86ed47519bbee32bfa26529400e74ee7 /src/WixToolset.Core
parente4d3a0d14dec69fd110394b361274de86f61afa2 (diff)
downloadwix-7b583330fd42356930bdc5a28820e546f6ca45a4.tar.gz
wix-7b583330fd42356930bdc5a28820e546f6ca45a4.tar.bz2
wix-7b583330fd42356930bdc5a28820e546f6ca45a4.zip
Move short filename generation to the WindowsInstallerBackend
Diffstat (limited to 'src/WixToolset.Core')
-rw-r--r--src/WixToolset.Core/Common.cs2
-rw-r--r--src/WixToolset.Core/Compiler.cs124
-rw-r--r--src/WixToolset.Core/CompilerCore.cs1
-rw-r--r--src/WixToolset.Core/Compiler_2.cs46
-rw-r--r--src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs14
5 files changed, 34 insertions, 153 deletions
diff --git a/src/WixToolset.Core/Common.cs b/src/WixToolset.Core/Common.cs
index 183d7abd..a9fc9538 100644
--- a/src/WixToolset.Core/Common.cs
+++ b/src/WixToolset.Core/Common.cs
@@ -188,7 +188,7 @@ namespace WixToolset.Core
188 /// <param name="filename">Filename to verify.</param> 188 /// <param name="filename">Filename to verify.</param>
189 /// <param name="allowWildcards">true if wildcards are allowed in the filename.</param> 189 /// <param name="allowWildcards">true if wildcards are allowed in the filename.</param>
190 /// <returns>True if the filename is a valid short filename</returns> 190 /// <returns>True if the filename is a valid short filename</returns>
191 internal static bool IsValidShortFilename(string filename, bool allowWildcards) 191 public static bool IsValidShortFilename(string filename, bool allowWildcards)
192 { 192 {
193 if (String.IsNullOrEmpty(filename)) 193 if (String.IsNullOrEmpty(filename))
194 { 194 {
diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs
index 4d0e608b..b29821b0 100644
--- a/src/WixToolset.Core/Compiler.cs
+++ b/src/WixToolset.Core/Compiler.cs
@@ -300,24 +300,6 @@ namespace WixToolset.Core
300 } 300 }
301 301
302 /// <summary> 302 /// <summary>
303 /// Given a possible short and long file name, create an msi filename value.
304 /// </summary>
305 /// <param name="shortName">The short file name.</param>
306 /// <param name="longName">Possibly the long file name.</param>
307 /// <returns>The value in the msi filename data type.</returns>
308 private string GetMsiFilenameValue(string shortName, string longName)
309 {
310 if (null != shortName && null != longName && !String.Equals(shortName, longName, StringComparison.OrdinalIgnoreCase))
311 {
312 return String.Concat(shortName, "|", longName);
313 }
314 else
315 {
316 return this.Core.IsValidShortFilename(longName, false) ? longName : shortName;
317 }
318 }
319
320 /// <summary>
321 /// Adds a search property to the active section. 303 /// Adds a search property to the active section.
322 /// </summary> 304 /// </summary>
323 /// <param name="sourceLineNumbers">Current source/line number of processing.</param> 305 /// <param name="sourceLineNumbers">Current source/line number of processing.</param>
@@ -3036,12 +3018,6 @@ namespace WixToolset.Core
3036 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DestinationProperty", "DestinationDirectory")); 3018 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DestinationProperty", "DestinationDirectory"));
3037 } 3019 }
3038 3020
3039 // generate a short file name
3040 if (null == destinationShortName && (null != destinationName && !this.Core.IsValidShortFilename(destinationName, false)))
3041 {
3042 destinationShortName = this.Core.CreateShortName(destinationName, true, false, node.Name.LocalName, componentId);
3043 }
3044
3045 if (null == id) 3021 if (null == id)
3046 { 3022 {
3047 id = this.Core.CreateIdentifier("cf", sourceFolder, sourceDirectory, sourceProperty, destinationDirectory, destinationProperty, destinationName); 3023 id = this.Core.CreateIdentifier("cf", sourceFolder, sourceDirectory, sourceProperty, destinationDirectory, destinationProperty, destinationName);
@@ -3063,7 +3039,8 @@ namespace WixToolset.Core
3063 { 3039 {
3064 ComponentRef = componentId, 3040 ComponentRef = componentId,
3065 SourceName = sourceName, 3041 SourceName = sourceName,
3066 DestName= String.IsNullOrEmpty(destinationShortName) && String.IsNullOrEmpty(destinationName) ? null : this.GetMsiFilenameValue(destinationShortName, destinationName), 3042 DestinationName = destinationName,
3043 DestinationShortName = destinationShortName,
3067 SourceFolder = sourceDirectory ?? sourceProperty, 3044 SourceFolder = sourceDirectory ?? sourceProperty,
3068 DestFolder = destinationDirectory ?? destinationProperty, 3045 DestFolder = destinationDirectory ?? destinationProperty,
3069 Delete = delete, 3046 Delete = delete,
@@ -3108,7 +3085,8 @@ namespace WixToolset.Core
3108 { 3085 {
3109 ComponentRef = componentId, 3086 ComponentRef = componentId,
3110 FileRef = fileId, 3087 FileRef = fileId,
3111 DestinationName = String.IsNullOrEmpty(destinationShortName) && String.IsNullOrEmpty(destinationName) ? null : this.GetMsiFilenameValue(destinationShortName, destinationName), 3088 DestinationName = destinationName,
3089 DestinationShortName = destinationShortName,
3112 DestinationFolder = destinationDirectory ?? destinationProperty, 3090 DestinationFolder = destinationDirectory ?? destinationProperty,
3113 }); 3091 });
3114 } 3092 }
@@ -4184,16 +4162,12 @@ namespace WixToolset.Core
4184 { 4162 {
4185 if (String.IsNullOrEmpty(shortName)) 4163 if (String.IsNullOrEmpty(shortName))
4186 { 4164 {
4187 if (!name.Equals(".") && !name.Equals("SourceDir") && !this.Core.IsValidShortFilename(name, false))
4188 {
4189 shortName = this.Core.CreateShortName(name, false, false, "Directory", parentId);
4190 }
4191 } 4165 }
4192 else if (name.Equals(".")) 4166 else if (name == ".")
4193 { 4167 {
4194 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ShortName", "Name", name)); 4168 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ShortName", "Name", name));
4195 } 4169 }
4196 else if (name.Equals(shortName)) 4170 else if (name.Equals(shortName, StringComparison.OrdinalIgnoreCase))
4197 { 4171 {
4198 this.Core.Write(WarningMessages.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "Name", "ShortName", name)); 4172 this.Core.Write(WarningMessages.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "Name", "ShortName", name));
4199 } 4173 }
@@ -4210,16 +4184,12 @@ namespace WixToolset.Core
4210 { 4184 {
4211 if (String.IsNullOrEmpty(shortSourceName)) 4185 if (String.IsNullOrEmpty(shortSourceName))
4212 { 4186 {
4213 if (!sourceName.Equals(".") && !this.Core.IsValidShortFilename(sourceName, false))
4214 {
4215 shortSourceName = this.Core.CreateShortName(sourceName, false, false, "Directory", parentId);
4216 }
4217 } 4187 }
4218 else if (sourceName.Equals(".")) 4188 else if (sourceName == ".")
4219 { 4189 {
4220 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ShortSourceName", "SourceName", sourceName)); 4190 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ShortSourceName", "SourceName", sourceName));
4221 } 4191 }
4222 else if (sourceName.Equals(shortSourceName)) 4192 else if (sourceName.Equals(shortSourceName, StringComparison.OrdinalIgnoreCase))
4223 { 4193 {
4224 this.Core.Write(WarningMessages.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "SourceName", "ShortSourceName", sourceName)); 4194 this.Core.Write(WarningMessages.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "SourceName", "ShortSourceName", sourceName));
4225 } 4195 }
@@ -5463,7 +5433,6 @@ namespace WixToolset.Core
5463 var defaultSize = 0; 5433 var defaultSize = 0;
5464 string defaultVersion = null; 5434 string defaultVersion = null;
5465 string fontTitle = null; 5435 string fontTitle = null;
5466 var generatedShortFileName = false;
5467 var keyPath = YesNoType.NotSet; 5436 var keyPath = YesNoType.NotSet;
5468 string name = null; 5437 string name = null;
5469 var patchGroup = CompilerConstants.IntegerNotSet; 5438 var patchGroup = CompilerConstants.IntegerNotSet;
@@ -5686,16 +5655,22 @@ namespace WixToolset.Core
5686 } 5655 }
5687 } 5656 }
5688 5657
5689 // generate a short file name 5658 if (name == null)
5690 if (null == shortName && (null != name && !this.Core.IsValidShortFilename(name, false)))
5691 { 5659 {
5692 shortName = this.Core.CreateShortName(name, true, false, node.Name.LocalName, directoryId); 5660 if (shortName == null)
5693 generatedShortFileName = true; 5661 {
5662 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
5663 }
5664 else
5665 {
5666 name = shortName;
5667 shortName = null;
5668 }
5694 } 5669 }
5695 5670
5696 if (null == id) 5671 if (null == id)
5697 { 5672 {
5698 id = this.Core.CreateIdentifier("fil", directoryId, name ?? shortName); 5673 id = this.Core.CreateIdentifier("fil", directoryId, name);
5699 } 5674 }
5700 5675
5701 if (null != defaultVersion && null != companionFile) 5676 if (null != defaultVersion && null != companionFile)
@@ -5811,11 +5786,11 @@ namespace WixToolset.Core
5811 5786
5812 if (String.IsNullOrEmpty(source)) 5787 if (String.IsNullOrEmpty(source))
5813 { 5788 {
5814 source = name ?? shortName; 5789 source = name;
5815 } 5790 }
5816 else if (source.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)) // if source relies on parent directories, append the file name 5791 else if (source.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)) // if source relies on parent directories, append the file name
5817 { 5792 {
5818 source = null == name ? Path.Combine(source, shortName) : Path.Combine(source, name); 5793 source = Path.Combine(source, name);
5819 } 5794 }
5820 5795
5821 var attributes = FileSymbolAttributes.None; 5796 var attributes = FileSymbolAttributes.None;
@@ -5826,7 +5801,6 @@ namespace WixToolset.Core
5826 attributes |= checksum ? FileSymbolAttributes.Checksum : 0; 5801 attributes |= checksum ? FileSymbolAttributes.Checksum : 0;
5827 attributes |= compressed.HasValue && compressed == true ? FileSymbolAttributes.Compressed : 0; 5802 attributes |= compressed.HasValue && compressed == true ? FileSymbolAttributes.Compressed : 0;
5828 attributes |= compressed.HasValue && compressed == false ? FileSymbolAttributes.Uncompressed : 0; 5803 attributes |= compressed.HasValue && compressed == false ? FileSymbolAttributes.Uncompressed : 0;
5829 attributes |= generatedShortFileName ? FileSymbolAttributes.GeneratedShortFileName : 0;
5830 5804
5831 this.Core.AddSymbol(new FileSymbol(sourceLineNumbers, id) 5805 this.Core.AddSymbol(new FileSymbol(sourceLineNumbers, id)
5832 { 5806 {
@@ -5838,14 +5812,6 @@ namespace WixToolset.Core
5838 Language = defaultLanguage, 5812 Language = defaultLanguage,
5839 Attributes = attributes, 5813 Attributes = attributes,
5840 5814
5841 //ReadOnly = readOnly,
5842 //Hidden = hidden,
5843 //System = system,
5844 //Vital = vital,
5845 //Checksum = checksum,
5846 //Compressed = compressed,
5847 //GeneratedShortFileName = generatedShortFileName,
5848
5849 DirectoryRef = directoryId, 5815 DirectoryRef = directoryId,
5850 DiskId = (CompilerConstants.IntegerNotSet == diskId) ? null : (int?)diskId, 5816 DiskId = (CompilerConstants.IntegerNotSet == diskId) ? null : (int?)diskId,
5851 Source = new IntermediateFieldPathValue { Path = source }, 5817 Source = new IntermediateFieldPathValue { Path = source },
@@ -6454,28 +6420,6 @@ namespace WixToolset.Core
6454 { 6420 {
6455 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 6421 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
6456 } 6422 }
6457 else if (0 < name.Length)
6458 {
6459 if (this.Core.IsValidShortFilename(name, false))
6460 {
6461 if (null == shortName)
6462 {
6463 shortName = name;
6464 name = null;
6465 }
6466 else
6467 {
6468 this.Core.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName"));
6469 }
6470 }
6471 else // generate a short file name.
6472 {
6473 if (null == shortName)
6474 {
6475 shortName = this.Core.CreateShortName(name, true, false, node.Name.LocalName, componentId);
6476 }
6477 }
6478 }
6479 6423
6480 if (null == section) 6424 if (null == section)
6481 { 6425 {
@@ -6493,7 +6437,8 @@ namespace WixToolset.Core
6493 { 6437 {
6494 this.Core.AddSymbol(new IniFileSymbol(sourceLineNumbers, id) 6438 this.Core.AddSymbol(new IniFileSymbol(sourceLineNumbers, id)
6495 { 6439 {
6496 FileName = this.GetMsiFilenameValue(shortName, name), 6440 FileName = name,
6441 ShortFileName = shortName,
6497 DirProperty = directory, 6442 DirProperty = directory,
6498 Section = section, 6443 Section = section,
6499 Key = key, 6444 Key = key,
@@ -6585,25 +6530,6 @@ namespace WixToolset.Core
6585 { 6530 {
6586 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 6531 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
6587 } 6532 }
6588 else if (0 < name.Length)
6589 {
6590 if (this.Core.IsValidShortFilename(name, false))
6591 {
6592 if (null == shortName)
6593 {
6594 shortName = name;
6595 name = null;
6596 }
6597 else
6598 {
6599 this.Core.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName"));
6600 }
6601 }
6602 else if (null == shortName) // generate a short file name.
6603 {
6604 shortName = this.Core.CreateShortName(name, true, false, node.Name.LocalName);
6605 }
6606 }
6607 6533
6608 if (null == section) 6534 if (null == section)
6609 { 6535 {
@@ -6677,8 +6603,8 @@ namespace WixToolset.Core
6677 { 6603 {
6678 var symbol = this.Core.AddSymbol(new IniLocatorSymbol(sourceLineNumbers, id) 6604 var symbol = this.Core.AddSymbol(new IniLocatorSymbol(sourceLineNumbers, id)
6679 { 6605 {
6680 SignatureRef = id.Id, 6606 FileName = name,
6681 FileName = this.GetMsiFilenameValue(shortName, name), 6607 ShortFileName = shortName,
6682 Section = section, 6608 Section = section,
6683 Key = key, 6609 Key = key,
6684 Type = type 6610 Type = type
diff --git a/src/WixToolset.Core/CompilerCore.cs b/src/WixToolset.Core/CompilerCore.cs
index 7ec83a7d..c2724f6b 100644
--- a/src/WixToolset.Core/CompilerCore.cs
+++ b/src/WixToolset.Core/CompilerCore.cs
@@ -286,6 +286,7 @@ namespace WixToolset.Core
286 /// <param name="allowWildcards">true if wildcards are allowed in the filename.</param> 286 /// <param name="allowWildcards">true if wildcards are allowed in the filename.</param>
287 /// <param name="args">Any additional information to include in the hash for the generated short name.</param> 287 /// <param name="args">Any additional information to include in the hash for the generated short name.</param>
288 /// <returns>The generated 8.3-compliant short file/directory name.</returns> 288 /// <returns>The generated 8.3-compliant short file/directory name.</returns>
289 [Obsolete]
289 public string CreateShortName(string longName, bool keepExtension, bool allowWildcards, params string[] args) 290 public string CreateShortName(string longName, bool keepExtension, bool allowWildcards, params string[] args)
290 { 291 {
291 return this.parseHelper.CreateShortName(longName, keepExtension, allowWildcards, args); 292 return this.parseHelper.CreateShortName(longName, keepExtension, allowWildcards, args);
diff --git a/src/WixToolset.Core/Compiler_2.cs b/src/WixToolset.Core/Compiler_2.cs
index 72550ed9..7e2485e1 100644
--- a/src/WixToolset.Core/Compiler_2.cs
+++ b/src/WixToolset.Core/Compiler_2.cs
@@ -2309,25 +2309,6 @@ namespace WixToolset.Core
2309 { 2309 {
2310 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 2310 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
2311 } 2311 }
2312 else if (0 < name.Length)
2313 {
2314 if (this.Core.IsValidShortFilename(name, true))
2315 {
2316 if (null == shortName)
2317 {
2318 shortName = name;
2319 name = null;
2320 }
2321 else
2322 {
2323 this.Core.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName"));
2324 }
2325 }
2326 else if (null == shortName) // generate a short file name.
2327 {
2328 shortName = this.Core.CreateShortName(name, true, true, node.Name.LocalName, componentId);
2329 }
2330 }
2331 2312
2332 if (!onInstall.HasValue && !onUninstall.HasValue) 2313 if (!onInstall.HasValue && !onUninstall.HasValue)
2333 { 2314 {
@@ -2352,8 +2333,9 @@ namespace WixToolset.Core
2352 this.Core.AddSymbol(new RemoveFileSymbol(sourceLineNumbers, id) 2333 this.Core.AddSymbol(new RemoveFileSymbol(sourceLineNumbers, id)
2353 { 2334 {
2354 ComponentRef = componentId, 2335 ComponentRef = componentId,
2355 FileName = this.GetMsiFilenameValue(shortName, name), 2336 FileName = name,
2356 DirProperty = directory ?? property ?? parentDirectory, 2337 ShortFileName = shortName,
2338 DirPropertyRef = directory ?? property ?? parentDirectory,
2357 OnInstall = onInstall, 2339 OnInstall = onInstall,
2358 OnUninstall = onUninstall, 2340 OnUninstall = onUninstall,
2359 }); 2341 });
@@ -2440,7 +2422,7 @@ namespace WixToolset.Core
2440 this.Core.AddSymbol(new RemoveFileSymbol(sourceLineNumbers, id) 2422 this.Core.AddSymbol(new RemoveFileSymbol(sourceLineNumbers, id)
2441 { 2423 {
2442 ComponentRef = componentId, 2424 ComponentRef = componentId,
2443 DirProperty = directory ?? property ?? parentDirectory, 2425 DirPropertyRef = directory ?? property ?? parentDirectory,
2444 OnInstall = onInstall, 2426 OnInstall = onInstall,
2445 OnUninstall = onUninstall 2427 OnUninstall = onUninstall
2446 }); 2428 });
@@ -4293,24 +4275,6 @@ namespace WixToolset.Core
4293 { 4275 {
4294 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 4276 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
4295 } 4277 }
4296 else if (0 < name.Length)
4297 {
4298 if (this.Core.IsValidShortFilename(name, false))
4299 {
4300 if (null == shortName)
4301 {
4302 shortName = name;
4303 }
4304 else
4305 {
4306 this.Core.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName"));
4307 }
4308 }
4309 else if (null == shortName) // generate a short file name.
4310 {
4311 shortName = this.Core.CreateShortName(name, true, false, node.Name.LocalName, componentId, directory);
4312 }
4313 }
4314 4278
4315 if ("Component" != parentElementLocalName && null != target) 4279 if ("Component" != parentElementLocalName && null != target)
4316 { 4280 {
@@ -4319,7 +4283,7 @@ namespace WixToolset.Core
4319 4283
4320 if (null == id) 4284 if (null == id)
4321 { 4285 {
4322 id = this.Core.CreateIdentifier("sct", directory, LowercaseOrNull(name) ?? LowercaseOrNull(shortName)); 4286 id = this.Core.CreateIdentifier("sct", directory, LowercaseOrNull(name));
4323 } 4287 }
4324 4288
4325 foreach (var child in node.Elements()) 4289 foreach (var child in node.Elements())
diff --git a/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs b/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
index 7160c32e..db465354 100644
--- a/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
+++ b/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
@@ -75,16 +75,6 @@ namespace WixToolset.Core.ExtensibilityServices
75 75
76 public Identifier CreateDirectorySymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, string name, ISet<string> sectionInlinedDirectoryIds, string shortName = null, string sourceName = null, string shortSourceName = null) 76 public Identifier CreateDirectorySymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, string name, ISet<string> sectionInlinedDirectoryIds, string shortName = null, string sourceName = null, string shortSourceName = null)
77 { 77 {
78 if (String.IsNullOrEmpty(shortName) && !name.Equals("SourceDir") && !this.IsValidShortFilename(name))
79 {
80 shortName = this.CreateShortName(name, false, false, "Directory", parentId);
81 }
82
83 if (String.IsNullOrEmpty(shortSourceName) && !String.IsNullOrEmpty(sourceName) && !this.IsValidShortFilename(sourceName))
84 {
85 shortSourceName = this.CreateShortName(sourceName, false, false, "Directory", parentId);
86 }
87
88 // For anonymous directories, create the identifier. If this identifier already exists in the 78 // For anonymous directories, create the identifier. If this identifier already exists in the
89 // active section, bail so we don't add duplicate anonymous directory symbols (which are legal 79 // active section, bail so we don't add duplicate anonymous directory symbols (which are legal
90 // but bloat the intermediate and ultimately make the linker do "busy work"). 80 // but bloat the intermediate and ultimately make the linker do "busy work").
@@ -243,7 +233,7 @@ namespace WixToolset.Core.ExtensibilityServices
243 233
244 if (null == childId) 234 if (null == childId)
245 { 235 {
246 throw new ArgumentNullException("childId"); 236 throw new ArgumentNullException(nameof(childId));
247 } 237 }
248 238
249 section.AddSymbol(new WixGroupSymbol(sourceLineNumbers) 239 section.AddSymbol(new WixGroupSymbol(sourceLineNumbers)
@@ -419,7 +409,7 @@ namespace WixToolset.Core.ExtensibilityServices
419 { 409 {
420 if (null == attribute) 410 if (null == attribute)
421 { 411 {
422 throw new ArgumentNullException("attribute"); 412 throw new ArgumentNullException(nameof(attribute));
423 } 413 }
424 414
425 var emptyRule = canBeEmpty ? EmptyRule.CanBeEmpty : EmptyRule.CanBeWhitespaceOnly; 415 var emptyRule = canBeEmpty ? EmptyRule.CanBeEmpty : EmptyRule.CanBeWhitespaceOnly;