summaryrefslogtreecommitdiff
path: root/src/tools/heat/UtilHeatExtension.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/heat/UtilHeatExtension.cs')
-rw-r--r--src/tools/heat/UtilHeatExtension.cs36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/tools/heat/UtilHeatExtension.cs b/src/tools/heat/UtilHeatExtension.cs
index 6337340d..dd201892 100644
--- a/src/tools/heat/UtilHeatExtension.cs
+++ b/src/tools/heat/UtilHeatExtension.cs
@@ -60,13 +60,13 @@ namespace WixToolset.Harvesters
60 /// <param name="args">The option arguments.</param> 60 /// <param name="args">The option arguments.</param>
61 public override void ParseOptions(string type, string[] args) 61 public override void ParseOptions(string type, string[] args)
62 { 62 {
63 bool active = false; 63 var active = false;
64 IHarvesterExtension harvesterExtension = null; 64 IHarvesterExtension harvesterExtension = null;
65 bool suppressHarvestingRegistryValues = false; 65 var suppressHarvestingRegistryValues = false;
66 UtilFinalizeHarvesterMutator utilFinalizeHarvesterMutator = new UtilFinalizeHarvesterMutator(); 66 var utilFinalizeHarvesterMutator = new UtilFinalizeHarvesterMutator();
67 UtilMutator utilMutator = new UtilMutator(); 67 var utilMutator = new UtilMutator();
68 List<UtilTransformMutator> transformMutators = new List<UtilTransformMutator>(); 68 var transformMutators = new List<UtilTransformMutator>();
69 GenerateType generateType = GenerateType.Components; 69 var generateType = GenerateType.Components;
70 70
71 // select the harvester 71 // select the harvester
72 switch (type) 72 switch (type)
@@ -94,9 +94,9 @@ namespace WixToolset.Harvesters
94 utilMutator.SetUniqueIdentifiers = true; 94 utilMutator.SetUniqueIdentifiers = true;
95 95
96 // parse the options 96 // parse the options
97 for (int i = 0; i < args.Length; i++) 97 for (var i = 0; i < args.Length; i++)
98 { 98 {
99 string commandSwitch = args[i]; 99 var commandSwitch = args[i];
100 100
101 if (null == commandSwitch || 0 == commandSwitch.Length) // skip blank arguments 101 if (null == commandSwitch || 0 == commandSwitch.Length) // skip blank arguments
102 { 102 {
@@ -105,7 +105,7 @@ namespace WixToolset.Harvesters
105 105
106 if ('-' == commandSwitch[0] || '/' == commandSwitch[0]) 106 if ('-' == commandSwitch[0] || '/' == commandSwitch[0])
107 { 107 {
108 string truncatedCommandSwitch = commandSwitch.Substring(1); 108 var truncatedCommandSwitch = commandSwitch.Substring(1);
109 109
110 if ("ag" == truncatedCommandSwitch) 110 if ("ag" == truncatedCommandSwitch)
111 { 111 {
@@ -122,20 +122,20 @@ namespace WixToolset.Harvesters
122 } 122 }
123 else if ("dr" == truncatedCommandSwitch) 123 else if ("dr" == truncatedCommandSwitch)
124 { 124 {
125 string dr = this.GetArgumentParameter(args, i); 125 var dr = this.GetArgumentParameter(args, i);
126 126
127 if (this.Core.Messaging.EncounteredError) 127 if (this.Core.Messaging.EncounteredError)
128 { 128 {
129 return; 129 return;
130 } 130 }
131 131
132 if (harvesterExtension is DirectoryHarvester) 132 if (harvesterExtension is DirectoryHarvester directoryHarvester)
133 { 133 {
134 ((DirectoryHarvester)harvesterExtension).RootedDirectoryRef = dr; 134 directoryHarvester.RootedDirectoryRef = dr;
135 } 135 }
136 else if (harvesterExtension is FileHarvester) 136 else if (harvesterExtension is FileHarvester fileHarvester)
137 { 137 {
138 ((FileHarvester)harvesterExtension).RootedDirectoryRef = dr; 138 fileHarvester.RootedDirectoryRef = dr;
139 } 139 }
140 } 140 }
141 else if ("gg" == truncatedCommandSwitch) 141 else if ("gg" == truncatedCommandSwitch)
@@ -288,7 +288,7 @@ namespace WixToolset.Harvesters
288 { 288 {
289 if (harvesterExtension is DirectoryHarvester) 289 if (harvesterExtension is DirectoryHarvester)
290 { 290 {
291 string genType = this.GetArgumentParameter(args, i).ToUpperInvariant(); 291 var genType = this.GetArgumentParameter(args, i).ToUpperInvariant();
292 switch (genType) 292 switch (genType)
293 { 293 {
294 case "COMPONENTS": 294 case "COMPONENTS":
@@ -349,7 +349,7 @@ namespace WixToolset.Harvesters
349 this.Core.Mutator.AddExtension(utilMutator); 349 this.Core.Mutator.AddExtension(utilMutator);
350 350
351 // add the transforms 351 // add the transforms
352 foreach (UtilTransformMutator transformMutator in transformMutators) 352 foreach (var transformMutator in transformMutators)
353 { 353 {
354 this.Core.Mutator.AddExtension(transformMutator); 354 this.Core.Mutator.AddExtension(transformMutator);
355 } 355 }
@@ -362,8 +362,8 @@ namespace WixToolset.Harvesters
362 362
363 private string GetArgumentParameter(string[] args, int index, bool allowSpaces) 363 private string GetArgumentParameter(string[] args, int index, bool allowSpaces)
364 { 364 {
365 string truncatedCommandSwitch = args[index]; 365 var truncatedCommandSwitch = args[index];
366 string commandSwitchValue = args[index + 1]; 366 var commandSwitchValue = args[index + 1];
367 367
368 //increment the index to the switch value 368 //increment the index to the switch value
369 index++; 369 index++;