summaryrefslogtreecommitdiff
path: root/src/wix/heat/RegFileHarvester.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/wix/heat/RegFileHarvester.cs')
-rw-r--r--src/wix/heat/RegFileHarvester.cs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/wix/heat/RegFileHarvester.cs b/src/wix/heat/RegFileHarvester.cs
index 1377d413..b7ad8c7b 100644
--- a/src/wix/heat/RegFileHarvester.cs
+++ b/src/wix/heat/RegFileHarvester.cs
@@ -141,19 +141,19 @@ namespace WixToolset.Harvesters
141 { 141 {
142 string name = null; 142 string name = null;
143 string value = null; 143 string value = null;
144 Wix.RegistryValue.TypeType type; 144 var registryKey = new Wix.RegistryKey
145 Wix.RegistryKey registryKey = new Wix.RegistryKey(); 145 {
146 146 Root = root,
147 registryKey.Root = root; 147 Key = line
148 registryKey.Key = line; 148 };
149 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 { 151 {
152 Wix.RegistryValue registryValue = new Wix.RegistryValue(); 152 Wix.RegistryValue registryValue = new Wix.RegistryValue();
153 ArrayList charArray; 153 ArrayList charArray;
154 154
155 // Don't specifiy name for default attribute 155 // Don't specifiy name for default attribute
156 if (!string.IsNullOrEmpty(name)) 156 if (!String.IsNullOrEmpty(name))
157 { 157 {
158 registryValue.Name = name; 158 registryValue.Name = name;
159 } 159 }
@@ -163,7 +163,7 @@ namespace WixToolset.Harvesters
163 switch (type) 163 switch (type)
164 { 164 {
165 case Wix.RegistryValue.TypeType.binary: 165 case Wix.RegistryValue.TypeType.binary:
166 registryValue.Value = value.Replace(",", string.Empty).ToUpper(); 166 registryValue.Value = value.Replace(",", String.Empty).ToUpper();
167 break; 167 break;
168 168
169 case Wix.RegistryValue.TypeType.integer: 169 case Wix.RegistryValue.TypeType.integer:
@@ -172,7 +172,7 @@ namespace WixToolset.Harvesters
172 172
173 case Wix.RegistryValue.TypeType.expandable: 173 case Wix.RegistryValue.TypeType.expandable:
174 charArray = this.ConvertCharList(value); 174 charArray = this.ConvertCharList(value);
175 value = string.Empty; 175 value = String.Empty;
176 176
177 // create the string, remove the terminating null 177 // create the string, remove the terminating null
178 for (int i = 0; i < charArray.Count; i++) 178 for (int i = 0; i < charArray.Count; i++)
@@ -188,7 +188,7 @@ namespace WixToolset.Harvesters
188 188
189 case Wix.RegistryValue.TypeType.multiString: 189 case Wix.RegistryValue.TypeType.multiString:
190 charArray = this.ConvertCharList(value); 190 charArray = this.ConvertCharList(value);
191 value = string.Empty; 191 value = String.Empty;
192 192
193 // Convert the character array to a string so we can simply split it at the nulls, ignore the final null null. 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++) 194 for (int i = 0; i < (charArray.Count - 2); i++)
@@ -399,7 +399,7 @@ namespace WixToolset.Harvesters
399 /// <returns>Array of characters.</returns> 399 /// <returns>Array of characters.</returns>
400 private ArrayList ConvertCharList(string charList) 400 private ArrayList ConvertCharList(string charList)
401 { 401 {
402 if (string.IsNullOrEmpty(charList)) 402 if (String.IsNullOrEmpty(charList))
403 { 403 {
404 return new ArrayList(); 404 return new ArrayList();
405 } 405 }