38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
using System.Web.Mvc;
|
|
using System.Web.Optimization;
|
|
using System.Web.Routing;
|
|
using Backload.Bundles;
|
|
using LeafWeb.Core.DAL;
|
|
using Umbraco.Core;
|
|
|
|
namespace LeafWeb.WebCms.App_Start
|
|
{
|
|
public class RegisterServices : ApplicationEventHandler
|
|
{
|
|
// TODO: after upgrading Umbraco, this might be helpful
|
|
// protected override bool ExecuteWhenApplicationNotConfigured => true;
|
|
|
|
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
|
|
{
|
|
DataService.RegisterInitializer();
|
|
HangfireBootstrapper.Instance.Start();
|
|
BackloadBundles.RegisterBundles(BundleTable.Bundles);
|
|
|
|
// route for downloading results
|
|
RouteTable.Routes.MapRoute(
|
|
"ResultsDownload", // Route name
|
|
"Results/Download", // URL with parameters
|
|
new { controller = "Results", action = "Download" } // Parameter defaults
|
|
);
|
|
|
|
// route for downloading results
|
|
RouteTable.Routes.MapRoute(
|
|
"NotifyComplete", // Route name
|
|
"LeafInput/NotifyComplete", // URL with parameters
|
|
new { controller = "LeafInput", action = "NotifyComplete" } // Parameter defaults
|
|
);
|
|
|
|
base.ApplicationStarted(umbracoApplication, applicationContext);
|
|
}
|
|
}
|
|
} |