@@ -16,41 +16,41 @@ static void Main(string[] args)
16
16
string result = "" ;
17
17
DataObjectMappings deserialisedMapping = new DataObjectMappings ( ) ;
18
18
19
- //// Simple example template
20
- // stringTemplate = File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + @"..\..\TemplateSampleBasic.handlebars");
21
- // var template = Handlebars.Compile(stringTemplate);
22
- // jsonInput = File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + @"..\..\sampleBasic.json");
23
- // deserialisedMapping = JsonConvert.DeserializeObject<DataObjectMappings>(jsonInput);
24
- // result = template(deserialisedMapping);
25
- // Console.WriteLine(result);
19
+ // Simple example template
20
+ stringTemplate = File . ReadAllText ( AppDomain . CurrentDomain . BaseDirectory + @"..\..\TemplateSampleBasic.handlebars" ) ;
21
+ var template = Handlebars . Compile ( stringTemplate ) ;
22
+ jsonInput = File . ReadAllText ( AppDomain . CurrentDomain . BaseDirectory + @"..\..\sampleBasic.json" ) ;
23
+ deserialisedMapping = JsonConvert . DeserializeObject < DataObjectMappings > ( jsonInput ) ;
24
+ result = template ( deserialisedMapping ) ;
25
+ Console . WriteLine ( result ) ;
26
26
27
- //// Example using extensions
28
- // stringTemplate = File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + @"..\..\TemplateSampleBasicWithExtensions.handlebars");
29
- // template = Handlebars.Compile(stringTemplate);
30
- // jsonInput = File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + @"..\..\sampleBasicWithExtensions.json");
31
- // deserialisedMapping = JsonConvert.DeserializeObject<DataObjectMappings>(jsonInput);
32
- // result = template(deserialisedMapping);
33
- // Console.WriteLine(result);
27
+ // Example using extensions
28
+ stringTemplate = File . ReadAllText ( AppDomain . CurrentDomain . BaseDirectory + @"..\..\TemplateSampleBasicWithExtensions.handlebars" ) ;
29
+ template = Handlebars . Compile ( stringTemplate ) ;
30
+ jsonInput = File . ReadAllText ( AppDomain . CurrentDomain . BaseDirectory + @"..\..\sampleBasicWithExtensions.json" ) ;
31
+ deserialisedMapping = JsonConvert . DeserializeObject < DataObjectMappings > ( jsonInput ) ;
32
+ result = template ( deserialisedMapping ) ;
33
+ Console . WriteLine ( result ) ;
34
34
35
- //// Example using more than one mapping at data item level
36
- // stringTemplate = File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + @"..\..\TemplateSampleMultipleDataItemMappings.handlebars");
37
- // template = Handlebars.Compile(stringTemplate);
38
- // jsonInput = File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + @"..\..\sampleMultipleDataItemMappings.json");
39
- // deserialisedMapping = JsonConvert.DeserializeObject<DataObjectMappings>(jsonInput);
40
- // result = template(deserialisedMapping);
41
- // Console.WriteLine(result);
35
+ // Example using more than one mapping at data item level
36
+ stringTemplate = File . ReadAllText ( AppDomain . CurrentDomain . BaseDirectory + @"..\..\TemplateSampleMultipleDataItemMappings.handlebars" ) ;
37
+ template = Handlebars . Compile ( stringTemplate ) ;
38
+ jsonInput = File . ReadAllText ( AppDomain . CurrentDomain . BaseDirectory + @"..\..\sampleMultipleDataItemMappings.json" ) ;
39
+ deserialisedMapping = JsonConvert . DeserializeObject < DataObjectMappings > ( jsonInput ) ;
40
+ result = template ( deserialisedMapping ) ;
41
+ Console . WriteLine ( result ) ;
42
42
43
- //// Example generating DDL statements
44
- // stringTemplate = File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + @"..\..\TemplateSampleSimpleDDL.handlebars");
45
- // template = Handlebars.Compile(stringTemplate);
46
- // jsonInput = File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + @"..\..\sampleSimpleDDL.json");
47
- // deserialisedMapping = JsonConvert.DeserializeObject<DataObjectMappings>(jsonInput);
48
- // result = template(deserialisedMapping);
49
- // Console.WriteLine(result);
43
+ // Example generating DDL statements
44
+ stringTemplate = File . ReadAllText ( AppDomain . CurrentDomain . BaseDirectory + @"..\..\TemplateSampleSimpleDDL.handlebars" ) ;
45
+ template = Handlebars . Compile ( stringTemplate ) ;
46
+ jsonInput = File . ReadAllText ( AppDomain . CurrentDomain . BaseDirectory + @"..\..\sampleSimpleDDL.json" ) ;
47
+ deserialisedMapping = JsonConvert . DeserializeObject < DataObjectMappings > ( jsonInput ) ;
48
+ result = template ( deserialisedMapping ) ;
49
+ Console . WriteLine ( result ) ;
50
50
51
51
// Example using OneOf / swapping a source for a query
52
52
stringTemplate = File . ReadAllText ( AppDomain . CurrentDomain . BaseDirectory + @"..\..\TemplateSampleCalculation.handlebars" ) ;
53
- var template = Handlebars . Compile ( stringTemplate ) ;
53
+ template = Handlebars . Compile ( stringTemplate ) ;
54
54
jsonInput = File . ReadAllText ( AppDomain . CurrentDomain . BaseDirectory + @"..\..\sampleCalculation.json" ) ;
55
55
deserialisedMapping = JsonConvert . DeserializeObject < DataObjectMappings > ( jsonInput ) ;
56
56
result = template ( deserialisedMapping ) ;
0 commit comments