Refactor Transformer (add Scriban) (#562)

This commit is contained in:
Stef Heyenrath
2021-01-19 21:11:33 +01:00
committed by GitHub
parent 73e73cebb7
commit c35315e610
43 changed files with 1405 additions and 767 deletions

View File

@@ -0,0 +1,19 @@
using HandlebarsDotNet;
using WireMock.Handlers;
namespace WireMock.Transformers.Handlebars
{
internal class HandlebarsContext : IHandlebarsContext
{
public IHandlebars Handlebars { get; set; }
public IFileSystemHandler FileSystemHandler { get; set; }
public string ParseAndRender(string text, object model)
{
var template = Handlebars.Compile(text);
return template(model);
}
}
}