mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-02-19 00:37:42 +01:00
18 lines
463 B
C#
18 lines
463 B
C#
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);
|
|
}
|
|
}
|
|
} |