File tree Expand file tree Collapse file tree 6 files changed +18
-101
lines changed Expand file tree Collapse file tree 6 files changed +18
-101
lines changed Original file line number Diff line number Diff line change 36
36
</ItemGroup >
37
37
38
38
<Target Name =" PreBuild" BeforeTargets =" PreBuildEvent" >
39
- <Exec Command =" HandlebarsCompiler.exe -c -f $(ProjectPath)" />
39
+ <Exec Command =" HandlebarsCompiler.exe -c $(ProjectPath)" />
40
40
</Target >
41
41
42
42
</Project >
Original file line number Diff line number Diff line change 3
3
using System . Net ;
4
4
using System . Text ;
5
5
using System . Collections . Generic ;
6
+ using CompiledHandlebars . RuntimeUtils ;
7
+ using static CompiledHandlebars . RuntimeUtils . RenderHelper ;
6
8
7
9
namespace AspDotNetCore
8
10
{
@@ -17,38 +19,5 @@ public static string Render(AspDotNetCore.ViewModel viewModel)
17
19
sb . Append ( "!</h1>\r \n </body>\r \n </html>" ) ;
18
20
return sb . ToString ( ) ;
19
21
}
20
-
21
- private static bool IsTruthy ( bool b )
22
- {
23
- return b ;
24
- }
25
-
26
- private static bool IsTruthy ( string s )
27
- {
28
- return ! string . IsNullOrEmpty ( s ) ;
29
- }
30
-
31
- private static bool IsTruthy ( object o )
32
- {
33
- return o != null ;
34
- }
35
-
36
- private static bool IsTruthy < T > ( IEnumerable < T > ie )
37
- {
38
- return ie != null && ie . Any ( ) ;
39
- }
40
-
41
- private static bool IsTruthy ( int i )
42
- {
43
- return i != 0 ;
44
- }
45
-
46
- private class CompiledHandlebarsTemplateAttribute : Attribute
47
- {
48
- }
49
-
50
- private class CompiledHandlebarsLayoutAttribute : Attribute
51
- {
52
- }
53
22
}
54
23
}
Original file line number Diff line number Diff line change 4
4
using System . Text ;
5
5
using System . Collections . Generic ;
6
6
using AspDotNetCore . Views . Partials ;
7
+ using CompiledHandlebars . RuntimeUtils ;
8
+ using static CompiledHandlebars . RuntimeUtils . RenderHelper ;
7
9
8
10
namespace AspDotNetCore . Views . Layouts
9
11
{
@@ -14,7 +16,7 @@ public static string PostRender(System.String viewModel)
14
16
{
15
17
var sb = new StringBuilder ( 64 ) ;
16
18
sb . Append ( "\r \n \t " ) ;
17
- sb . Append ( Footer . Render ( "Partial" ) ) ;
19
+ sb . Append ( Footer . Render ( "Partial in the layout " ) ) ;
18
20
sb . Append ( "\r \n </body>\r \n </html>" ) ;
19
21
return sb . ToString ( ) ;
20
22
}
@@ -27,38 +29,5 @@ public static string PreRender(System.String viewModel)
27
29
sb . Append ( "</title>\r \n </head>\r \n <body>\r \n \t " ) ;
28
30
return sb . ToString ( ) ;
29
31
}
30
-
31
- private static bool IsTruthy ( bool b )
32
- {
33
- return b ;
34
- }
35
-
36
- private static bool IsTruthy ( string s )
37
- {
38
- return ! string . IsNullOrEmpty ( s ) ;
39
- }
40
-
41
- private static bool IsTruthy ( object o )
42
- {
43
- return o != null ;
44
- }
45
-
46
- private static bool IsTruthy < T > ( IEnumerable < T > ie )
47
- {
48
- return ie != null && ie . Any ( ) ;
49
- }
50
-
51
- private static bool IsTruthy ( int i )
52
- {
53
- return i != 0 ;
54
- }
55
-
56
- private class CompiledHandlebarsTemplateAttribute : Attribute
57
- {
58
- }
59
-
60
- private class CompiledHandlebarsLayoutAttribute : Attribute
61
- {
62
- }
63
32
}
64
33
}
Original file line number Diff line number Diff line change 3
3
using System . Net ;
4
4
using System . Text ;
5
5
using System . Collections . Generic ;
6
+ using CompiledHandlebars . RuntimeUtils ;
7
+ using static CompiledHandlebars . RuntimeUtils . RenderHelper ;
6
8
7
9
namespace AspDotNetCore . Views . Partials
8
10
{
@@ -17,38 +19,5 @@ public static string Render(System.String viewModel)
17
19
sb . Append ( "!</h2>" ) ;
18
20
return sb . ToString ( ) ;
19
21
}
20
-
21
- private static bool IsTruthy ( bool b )
22
- {
23
- return b ;
24
- }
25
-
26
- private static bool IsTruthy ( string s )
27
- {
28
- return ! string . IsNullOrEmpty ( s ) ;
29
- }
30
-
31
- private static bool IsTruthy ( object o )
32
- {
33
- return o != null ;
34
- }
35
-
36
- private static bool IsTruthy < T > ( IEnumerable < T > ie )
37
- {
38
- return ie != null && ie . Any ( ) ;
39
- }
40
-
41
- private static bool IsTruthy ( int i )
42
- {
43
- return i != 0 ;
44
- }
45
-
46
- private class CompiledHandlebarsTemplateAttribute : Attribute
47
- {
48
- }
49
-
50
- private class CompiledHandlebarsLayoutAttribute : Attribute
51
- {
52
- }
53
22
}
54
23
}
Original file line number Diff line number Diff line change 4
4
<TargetFrameworks >net45;net46;netstandard1.6</TargetFrameworks >
5
5
<AssemblyName >CompiledHandlebars.RuntimeUtils</AssemblyName >
6
6
<RootNamespace >CompiledHandlebars.RuntimeUtils</RootNamespace >
7
+ <Version >0.3.3</Version >
8
+ <Description >RuntimeUtils for the HandlebarsCompiler.</Description >
9
+ <Authors >CurrySoftware GmbH</Authors >
10
+ <Company >CurrySoftware GmbH</Company >
11
+ <Product >HandlebarsCompiler</Product >
7
12
</PropertyGroup >
8
13
9
14
</Project >
Original file line number Diff line number Diff line change 4
4
<TargetFrameworks >netstandard1.6;net46</TargetFrameworks >
5
5
<AssemblyName >CompiledHandlebars.ViewEngine.Core</AssemblyName >
6
6
<RootNamespace >CompiledHandlebars.ViewEngine.Core</RootNamespace >
7
+ <Version >0.3.3</Version >
8
+ <Authors >CurrySoftware GmbH</Authors >
9
+ <Company >CurrySoftware GmbH</Company >
10
+ <Product >HanldebarsCompiler</Product >
11
+ <Description >A ViewEngine for asp.net core that renders compiled handlebars templates.</Description >
7
12
</PropertyGroup >
8
13
9
14
<ItemGroup >
You can’t perform that action at this time.
0 commit comments