Files
Disco/Disco.Web/App_Start/RazorGeneratorMvcStart.cs
Gary Sharp be25569245 Update 3rd Party Libraries
Json.NET, jQuery, jQuery UI, modernizr, moment.js, Highcharts, TinyMCE,
normalize.css, T4MVC, RazorGenerator, Reactive Extensions
2014-06-02 02:11:03 +10:00

29 lines
758 B
C#

using System.Web;
using System.Web.Mvc;
using System.Web.WebPages;
using RazorGenerator.Mvc;
[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(Disco.Web.RazorGeneratorMvcStart), "Start")]
namespace Disco.Web
{
public static class RazorGeneratorMvcStart
{
public static void Start()
{
var engine = new PrecompiledMvcEngine(typeof(RazorGeneratorMvcStart).Assembly)
{
#if DEBUG
UsePhysicalViewsIfNewer = true
#else
UsePhysicalViewsIfNewer = false
#endif
};
ViewEngines.Engines.Insert(0, engine);
// StartPage lookups are done by WebPages.
VirtualPathFactoryManager.RegisterVirtualPathFactory(engine);
}
}
}