Files
Disco/Disco.Services/App_Start/RazorGeneratorMvcStart.cs
Gary Sharp c13d13c91c Update: 3rd Party Libraries
Newtonsoft.Json 5.0.8; RazorGenerator.Mvc 2.1.2; jQuery 2.0.3; jQuery
Validate Unobtrusive 3.0.0; Microsoft.Net.Http 2.1.10; KnockoutJS 2.3.0;
Highcharts 2.0; T4MVC 3.7.4; TinyMCE 4.0.9
2013-10-28 17:42:38 +11:00

22 lines
725 B
C#

using System.Web;
using System.Web.Mvc;
using System.Web.WebPages;
using RazorGenerator.Mvc;
[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(Disco.Services.App_Start.RazorGeneratorMvcStart), "Start")]
namespace Disco.Services.App_Start {
public static class RazorGeneratorMvcStart {
public static void Start() {
var engine = new PrecompiledMvcEngine(typeof(RazorGeneratorMvcStart).Assembly) {
UsePhysicalViewsIfNewer = HttpContext.Current.Request.IsLocal
};
ViewEngines.Engines.Insert(0, engine);
// StartPage lookups are done by WebPages.
VirtualPathFactoryManager.RegisterVirtualPathFactory(engine);
}
}
}