internal static void Initialize(SageContext context)
{
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new XsltViewEngine());
ViewEngines.Engines.Add(new WebFormViewEngine());
Project.InitializeConfiguration(context);
//// The routes need to be re-registered after the assemblies get updated
Project.AssembliesUpdated += (sender, args) => Project.RegisterRoutes();
Project.RegisterRoutes();
var controller = Project.Configuration.Routing.DefaultController;
var action = Project.Configuration.Routing.DefaultAction;
var routeName = string.Format("{0}.{1}", controller, action);
log.DebugFormat("Manually registering route '*' to {0}", routeName);
RouteTable.Routes.MapRouteLowercase(
routeName,
"{*path}",
new Dictionary<string, object> { { "controller", controller.Replace("Controller", string.Empty) }, { "action", action } });
projectIsReady = true;
}