@@ -136,7 +136,7 @@ static int Main(string[] args)
136
136
else
137
137
{
138
138
RunAutomation ( options , options . input , options . outputFileName ) ;
139
- }
139
+ }
140
140
}
141
141
#endregion
142
142
@@ -150,9 +150,8 @@ static int Main(string[] args)
150
150
// h => CommandLine.Text.HelpText.DefaultParsingErrorsHandler(result, h),
151
151
// e => e);
152
152
//Console.WriteLine(helpText);
153
-
154
153
155
- //Console.ReadKey();
154
+ //Console.ReadKey();
156
155
157
156
return Environment . ExitCode ;
158
157
}
@@ -166,9 +165,9 @@ private static void RunAutomation(Options options, string inputFileName, string
166
165
var template = Handlebars . Compile ( stringTemplate ) ;
167
166
168
167
//var deserialisedMapping = JsonConvert.DeserializeObject<VdwDataObjectMappings>(jsonInput);
169
- var freeFormMapping = JObject . Parse ( jsonInput ) ;
168
+ var deserialisedMapping = JObject . Parse ( jsonInput ) ;
170
169
171
- var result = template ( freeFormMapping ) ;
170
+ var result = template ( deserialisedMapping ) ;
172
171
173
172
if ( options . verbose )
174
173
{
@@ -182,7 +181,7 @@ private static void RunAutomation(Options options, string inputFileName, string
182
181
//outputFileName = deserialisedMapping.dataObjectMappings[0].mappingName; // you could read this from the free form mapping file, too
183
182
try
184
183
{
185
- outputFileName = ( string ) freeFormMapping [ "dataObjectMappings" ] [ 0 ] [ "mappingName" ] ;
184
+ outputFileName = ( string ) deserialisedMapping [ "dataObjectMappings" ] [ 0 ] [ "mappingName" ] ;
186
185
}
187
186
catch
188
187
{
@@ -197,10 +196,8 @@ private static void RunAutomation(Options options, string inputFileName, string
197
196
198
197
Console . WriteLine ( $ "Generating { outputFileName } .{ options . outputFileExtension } to { options . outputDirectory } .") ;
199
198
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 ) ;
204
201
}
205
202
206
203
Environment . ExitCode = ( int ) ExitCode . Success ;
0 commit comments