@@ -136,7 +136,7 @@ static int Main(string[] args)
136136 else
137137 {
138138 RunAutomation ( options , options . input , options . outputFileName ) ;
139- }
139+ }
140140 }
141141 #endregion
142142
@@ -150,9 +150,8 @@ static int Main(string[] args)
150150 // h => CommandLine.Text.HelpText.DefaultParsingErrorsHandler(result, h),
151151 // e => e);
152152 //Console.WriteLine(helpText);
153-
154153
155- //Console.ReadKey();
154+ //Console.ReadKey();
156155
157156 return Environment . ExitCode ;
158157 }
@@ -166,9 +165,9 @@ private static void RunAutomation(Options options, string inputFileName, string
166165 var template = Handlebars . Compile ( stringTemplate ) ;
167166
168167 //var deserialisedMapping = JsonConvert.DeserializeObject<VdwDataObjectMappings>(jsonInput);
169- var freeFormMapping = JObject . Parse ( jsonInput ) ;
168+ var deserialisedMapping = JObject . Parse ( jsonInput ) ;
170169
171- var result = template ( freeFormMapping ) ;
170+ var result = template ( deserialisedMapping ) ;
172171
173172 if ( options . verbose )
174173 {
@@ -182,7 +181,7 @@ private static void RunAutomation(Options options, string inputFileName, string
182181 //outputFileName = deserialisedMapping.dataObjectMappings[0].mappingName; // you could read this from the free form mapping file, too
183182 try
184183 {
185- outputFileName = ( string ) freeFormMapping [ "dataObjectMappings" ] [ 0 ] [ "mappingName" ] ;
184+ outputFileName = ( string ) deserialisedMapping [ "dataObjectMappings" ] [ 0 ] [ "mappingName" ] ;
186185 }
187186 catch
188187 {
@@ -197,10 +196,8 @@ private static void RunAutomation(Options options, string inputFileName, string
197196
198197 Console . WriteLine ( $ "Generating { outputFileName } .{ options . outputFileExtension } to { options . outputDirectory } .") ;
199198
200- using ( StreamWriter file = new StreamWriter ( $ "{ options . outputDirectory } \\ { outputFileName } .{ options . outputFileExtension } ") )
201- {
202- file . WriteLine ( result ) ;
203- }
199+ using StreamWriter file = new StreamWriter ( $ "{ options . outputDirectory } \\ { outputFileName } .{ options . outputFileExtension } ") ;
200+ file . WriteLine ( result ) ;
204201 }
205202
206203 Environment . ExitCode = ( int ) ExitCode . Success ;
0 commit comments