public IHandlebars Create() { var handlebarsContext = Handlebars.Create(HandlebarsConfiguration); HandlebarsHelpers.Register(handlebarsContext, _fileSystemHandler); _action?.Invoke(handlebarsContext, _fileSystemHandler); return(handlebarsContext); }
public IHandlebarsContext Create() { var handlebars = Handlebars.Create(HandlebarsConfiguration); HandlebarsHelpers.Register(handlebars, _fileSystemHandler); _action?.Invoke(handlebars, _fileSystemHandler); return(new HandlebarsContext { Handlebars = handlebars, FileSystemHandler = _fileSystemHandler }); }
public static void Register(IHandlebars handlebarsContext, IFileSystemHandler fileSystemHandler) { // Register https://github.com/StefH/Handlebars.Net.Helpers HandlebarsHelpers.Register(handlebarsContext); // Register WireMock.Net specific helpers HandlebarsRegex.Register(handlebarsContext); HandlebarsJsonPath.Register(handlebarsContext); HandlebarsLinq.Register(handlebarsContext); HandlebarsRandom.Register(handlebarsContext); HandlebarsXeger.Register(handlebarsContext); HandlebarsXPath.Register(handlebarsContext); HandlebarsFile.Register(handlebarsContext, fileSystemHandler); }
static ResponseMessageTransformer() { HandlebarsHelpers.Register(HandlebarsContext); }
public ResponseMessageTransformer([NotNull] IFileSystemHandler fileSystemHandler) { Check.NotNull(fileSystemHandler, nameof(fileSystemHandler)); HandlebarsHelpers.Register(HandlebarsContext, fileSystemHandler); }