Exemplo n.º 1
0
 public static string Render(CompiledHandlebars.CompilerTests.TestViewModels.PageModel viewModel)
 {
   var sb = new StringBuilder(64);
   sb.Append(LayoutsWithInterfaceModelTest1.PreRender(viewModel));
   sb.Append("<h1>");
   sb.Append(WebUtility.HtmlEncode(viewModel.Headline));
   sb.Append("</h1>");
   sb.Append(LayoutsWithInterfaceModelTest1.PostRender(viewModel));
   return sb.ToString();
 }
    public static string Render(CompiledHandlebars.CompilerTests.TestViewModels.PageModel viewModel)
    {
      var sb = new StringBuilder(64);
      if (IsTruthy(viewModel))
      {
        sb.Append(WebUtility.HtmlEncode(viewModel.Headline));
      }

      return sb.ToString();
    }