This commit is contained in:
Morten Christensen
2013-05-17 05:51:49 -02:00
106 changed files with 3316 additions and 1965 deletions

View File

@@ -2,6 +2,8 @@
using System.Web;
using System.Web.Hosting;
using System.Web.Mvc;
using StackExchange.Profiling;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
namespace Umbraco.Core
@@ -20,6 +22,11 @@ namespace Umbraco.Core
public static event EventHandler ApplicationStarting;
public static event EventHandler ApplicationStarted;
/// <summary>
/// Called when the HttpApplication.Init() is fired, allows developers to subscribe to the HttpApplication events
/// </summary>
public static event EventHandler ApplicationInit;
/// <summary>
/// Boots up the Umbraco application
/// </summary>
@@ -45,6 +52,15 @@ namespace Umbraco.Core
StartApplication(sender, e);
}
/// <summary>
/// Override init and raise the event
/// </summary>
public override void Init()
{
base.Init();
OnApplicationInit(this, new EventArgs());
}
/// <summary>
/// Developers can override this method to modify objects on startup
/// </summary>
@@ -67,6 +83,17 @@ namespace Umbraco.Core
ApplicationStarted(sender, e);
}
/// <summary>
/// Called to raise the ApplicationInit event
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnApplicationInit(object sender, EventArgs e)
{
if (ApplicationInit != null)
ApplicationInit(sender, e);
}
/// <summary>
/// A method that can be overridden to invoke code when the application has an error.
/// </summary>