protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            //Register individual view locations
            ViewEngineRegistration.Register(ViewEngines.Engines);

            //Register bundles
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
예제 #2
0
        public void ViewEngineRegistration_RunRegister_CsRazorViewEngineIsRegistered()
        {
            // Not registered
            Assert.IsFalse(System.Web.Mvc.ViewEngines.Engines.Any(f => f.GetType() == typeof(ProfilingViewEngine)));


            var systemUnderTest = new ViewEngineRegistration();

            // Run registration
            systemUnderTest.Register();

            // Is registered
            Assert.IsTrue(System.Web.Mvc.ViewEngines.Engines.Any(f => f.GetType() == typeof(ProfilingViewEngine)));
        }
 public void Initialize(InitializationEngine context)
 {
     ViewEngineRegistration.Register(ViewEngines.Engines);
 }