@joebigelow / wix-1 / commits / fe689d65

Quick automated code clean up

Rob Mensching committed Feb 6, 2022 at 09:38 UTC fe689d65adcb20c5f1cfc0eedfe75559c686adbb
3 files changed +23 -17
src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs
+8 -5
@@ -1552,12 +1552,15 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1552 }
1553 }
1554
1555 - private Row CreateRow(IntermediateSymbol symbol, string tableDefinitionName) =>
1556 - this.CreateRow(symbol, this.TableDefinitions[tableDefinitionName]);
1557 -
1558 - private Row CreateRow(IntermediateSymbol symbol, TableDefinition tableDefinition) =>
1559 - this.BackendHelper.CreateRow(this.Section, symbol, this.Data, tableDefinition);
1555 + private Row CreateRow(IntermediateSymbol symbol, string tableDefinitionName)
1556 + {
1557 + return this.CreateRow(symbol, this.TableDefinitions[tableDefinitionName]);
1558 + }
1559
1560 + private Row CreateRow(IntermediateSymbol symbol, TableDefinition tableDefinition)
1561 + {
1562 + return this.BackendHelper.CreateRow(this.Section, symbol, this.Data, tableDefinition);
1563 + }
1564
1565 private string CreateShortName(string longName, bool keepExtension, params string[] args)
1566 {
src/wix/WixToolset.Core.WindowsInstaller/MspBackend.cs
+4 -1
@@ -69,7 +69,10 @@ namespace WixToolset.Core.WindowsInstaller
69 }
70 }
71
72 - public IDecompileResult Decompile(IDecompileContext context) => throw new NotImplementedException();
72 + public IDecompileResult Decompile(IDecompileContext context)
73 + {
74 + throw new NotImplementedException();
75 + }
76
77 public Intermediate Unbind(IUnbindContext context)
78 {
src/wix/heat/RegFileHarvester.cs
+11 -11
@@ -141,19 +141,19 @@ namespace WixToolset.Harvesters
141 {
142 string name = null;
143 string value = null;
144 - Wix.RegistryValue.TypeType type;
145 - Wix.RegistryKey registryKey = new Wix.RegistryKey();
146 -
147 - registryKey.Root = root;
148 - registryKey.Key = line;
144 + var registryKey = new Wix.RegistryKey
145 + {
146 + Root = root,
147 + Key = line
148 + };
149
150 - while (this.GetValue(sr, ref name, ref value, out type))
150 + while (this.GetValue(sr, ref name, ref value, out var type))
151 {
152 Wix.RegistryValue registryValue = new Wix.RegistryValue();
153 ArrayList charArray;
154
155 // Don't specifiy name for default attribute
156 - if (!string.IsNullOrEmpty(name))
156 + if (!String.IsNullOrEmpty(name))
157 {
158 registryValue.Name = name;
159 }
@@ -163,7 +163,7 @@ namespace WixToolset.Harvesters
163 switch (type)
164 {
165 case Wix.RegistryValue.TypeType.binary:
166 - registryValue.Value = value.Replace(",", string.Empty).ToUpper();
166 + registryValue.Value = value.Replace(",", String.Empty).ToUpper();
167 break;
168
169 case Wix.RegistryValue.TypeType.integer:
@@ -172,7 +172,7 @@ namespace WixToolset.Harvesters
172
173 case Wix.RegistryValue.TypeType.expandable:
174 charArray = this.ConvertCharList(value);
175 - value = string.Empty;
175 + value = String.Empty;
176
177 // create the string, remove the terminating null
178 for (int i = 0; i < charArray.Count; i++)
@@ -188,7 +188,7 @@ namespace WixToolset.Harvesters
188
189 case Wix.RegistryValue.TypeType.multiString:
190 charArray = this.ConvertCharList(value);
191 - value = string.Empty;
191 + value = String.Empty;
192
193 // Convert the character array to a string so we can simply split it at the nulls, ignore the final null null.
194 for (int i = 0; i < (charArray.Count - 2); i++)
@@ -399,7 +399,7 @@ namespace WixToolset.Harvesters
399 /// <returns>Array of characters.</returns>
400 private ArrayList ConvertCharList(string charList)
401 {
402 - if (string.IsNullOrEmpty(charList))
402 + if (String.IsNullOrEmpty(charList))
403 {
404 return new ArrayList();
405 }