예제 #1
0
        public IHandlebars Create()
        {
            var handlebarsContext = Handlebars.Create(HandlebarsConfiguration);

            HandlebarsHelpers.Register(handlebarsContext, _fileSystemHandler);

            _action?.Invoke(handlebarsContext, _fileSystemHandler);

            return(handlebarsContext);
        }
예제 #2
0
        public IHandlebarsContext Create()
        {
            var handlebars = Handlebars.Create(HandlebarsConfiguration);

            HandlebarsHelpers.Register(handlebars, _fileSystemHandler);

            _action?.Invoke(handlebars, _fileSystemHandler);

            return(new HandlebarsContext
            {
                Handlebars = handlebars,
                FileSystemHandler = _fileSystemHandler
            });
        }
예제 #3
0
        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);
        }
예제 #4
0
 static ResponseMessageTransformer()
 {
     HandlebarsHelpers.Register(HandlebarsContext);
 }
        public ResponseMessageTransformer([NotNull] IFileSystemHandler fileSystemHandler)
        {
            Check.NotNull(fileSystemHandler, nameof(fileSystemHandler));

            HandlebarsHelpers.Register(HandlebarsContext, fileSystemHandler);
        }