Last active
December 22, 2015 04:13
-
-
Save jesulink2514/6d795f2f6fdeb477912d to your computer and use it in GitHub Desktop.
Contenido del archivo global.asax para el motor de vistas con soporte para temas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Optimization; | |
using System.Web.Routing; | |
using MvcThemeable.Infraestructura; | |
namespace MvcThemeable | |
{ | |
public class MvcApplication : System.Web.HttpApplication | |
{ | |
protected void Application_Start() | |
{ | |
if (!String.IsNullOrWhiteSpace(ConfigurationManager.AppSettings["Tema"])) | |
{ | |
var tema = ConfigurationManager.AppSettings["Tema"]; | |
ViewEngines.Engines.Insert(0,new ThemeViewEngine(tema)); | |
} | |
AreaRegistration.RegisterAllAreas(); | |
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); | |
RouteConfig.RegisterRoutes(RouteTable.Routes); | |
BundleConfig.RegisterBundles(BundleTable.Bundles); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment