@@ -16,34 +16,42 @@ 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
+
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);
42
50
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" ) ;
51
+ // Example using OneOf / swapping a source for a query
52
+ stringTemplate = File . ReadAllText ( AppDomain . CurrentDomain . BaseDirectory + @"..\..\TemplateSampleCalculation .handlebars" ) ;
53
+ var template = Handlebars . Compile ( stringTemplate ) ;
54
+ jsonInput = File . ReadAllText ( AppDomain . CurrentDomain . BaseDirectory + @"..\..\sampleCalculation .json" ) ;
47
55
deserialisedMapping = JsonConvert . DeserializeObject < DataObjectMappings > ( jsonInput ) ;
48
56
result = template ( deserialisedMapping ) ;
49
57
Console . WriteLine ( result ) ;
0 commit comments