Пример #1
0
 public static void RegisterViewEngines(ViewEngineCollection engines)
 {
     engines.RemoveAt(0);
     engines.Add(new NustacheViewEngine(new string[] { "html" })
     {
         RootContext = NustacheViewEngineRootContext.Model
     });
 }
Пример #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
     });
 }
Пример #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();
     }
 }
Пример #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
                     });
 }
Пример #5
0
 public static void Register(ViewEngineCollection engines)
 {
     engines.RemoveAt(0);
     engines.Add(new HandlebarsViewEngine());
 }