Exemplo n.º 1
0
 public static void RegisterViewEngines(ViewEngineCollection engines)
 {
     engines.RemoveAt(0);
     engines.Add(new NustacheViewEngine(new string[] { "html" })
     {
         RootContext = NustacheViewEngineRootContext.Model
     });
 }
Exemplo n.º 2
0
 public static void RegisterViewEngines(ViewEngineCollection engines)
 {
     engines.RemoveAt(0);
     engines.Add(new NustacheViewEngine
     {
         // Comment out this line to require Model in front of all your expressions.
         // This makes it easier to share templates between the client and server.
         // But it also means that ViewData/ViewBag is inaccessible.
         RootContext = NustacheViewEngineRootContext.Model
     });
 }
Exemplo n.º 3
0
 public static void SetupViewEngines(ViewEngineCollection engines)
 {
     if (engines[0] is WebFormViewEngine)
     {
         engines.RemoveAt(0);                 // WebForm is not used
     }
     foreach (var eng in engines)
     {
         eng.SetupEngineForSite();
     }
 }
Exemplo n.º 4
0
 public static void RegisterViewEngines(ViewEngineCollection engines)
 {
     engines.RemoveAt(0);
     engines.Add(new NustacheViewEngine
                     {
                         // Comment out this line to require Model in front of all your expressions.
                         // This makes it easier to share templates between the client and server.
                         // But it also means that ViewData/ViewBag is inaccessible.
                         RootContext = NustacheViewEngineRootContext.Model
                     });
 }
Exemplo n.º 5
0
 public static void Register(ViewEngineCollection engines)
 {
     engines.RemoveAt(0);
     engines.Add(new HandlebarsViewEngine());
 }