Skip to content

Instantly share code, notes, and snippets.

@jesulink2514
Last active December 22, 2015 04:13
Show Gist options
  • Save jesulink2514/6d795f2f6fdeb477912d to your computer and use it in GitHub Desktop.
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
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