コード例 #1
0
        public string Render(string path, string template, object data)
        {
            lock (sync)
            {
                var result = Handlebars.CompileAndRun(path, template, data);

                return(result);
            }
        }
コード例 #2
0
        public void NRF_executing_basic_IS_template()
        {
            // Arrange
            string template = "{{#is Value \"!=\" 1}}True!{{/is}}";

            // Act
            string content = Handlebars.CompileAndRun("test", template, new { Value = 2 });

            // Assert
            Assert.NotNull(content);
            Assert.Equal("True!", content);
        }