Skip to content

v0.4.0

Compare
Choose a tag to compare
@MartinHaedicke MartinHaedicke released this 21 Jan 17:05
· 6 commits to master since this release
  • Generated templates are now using the async/await pattern
  • Instead of the Render methods returning a string, the new RenderAsync methods return nothing, but require a StringBuilder as parameter which itself is handed down to partials and helper functions.
  • If helper functions end on "Async" they are awaited now. e.g {{MyLittleHelperFunctionAsync ... will now cause the call to MyLittleHelperFunctionAsync to be awaited in the generated C# code.
  • to accomodate the new async/await templates the ViewEngines had to be adjusted. While for the integration of CompiledHandlebars.ViewEngine no action on your part should be neccessary, when you integrate a CompiledHandlebars.ViewEngine.Core, you now must provide a scoped StringFilterStream in your Startup routine. An example is provided in /Examples/AspDotNetCore/Startup.cs in the method ConfigureServices.