Converted over other IApplicationEventHandlers to use the simpler ApplicationEventHandler
This commit is contained in:
@@ -10,7 +10,7 @@ namespace Umbraco.Core
|
|||||||
/// if you need these methods to execute even if either of these are not configured you can override the properties:
|
/// if you need these methods to execute even if either of these are not configured you can override the properties:
|
||||||
/// ExecuteWhenApplicationNotConfigured and ExecuteWhenDatabaseNotConfigured
|
/// ExecuteWhenApplicationNotConfigured and ExecuteWhenDatabaseNotConfigured
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class ApplicationEventHandler : IApplicationEventHandler
|
public abstract class ApplicationEventHandler : IApplicationEventHandler
|
||||||
{
|
{
|
||||||
public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
|
public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ namespace Umbraco.Web
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This would be better left internal, however
|
/// This would be better left internal, however
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public sealed class CacheHelperApplicationEventListener : IApplicationEventHandler
|
public sealed class CacheHelperApplicationEventListener : ApplicationEventHandler
|
||||||
{
|
{
|
||||||
public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
|
protected override void ApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
|
||||||
{
|
{
|
||||||
if (applicationContext != null)
|
if (applicationContext != null)
|
||||||
{
|
{
|
||||||
@@ -44,13 +44,6 @@ namespace Umbraco.Web
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public const string PartialViewCacheKey = "Umbraco.Web.PartialViewCacheKey";
|
public const string PartialViewCacheKey = "Umbraco.Web.PartialViewCacheKey";
|
||||||
|
|||||||
@@ -16,18 +16,13 @@ namespace Umbraco.Web
|
|||||||
// and it needs to be manually registered - which we want to avoid, in order
|
// and it needs to be manually registered - which we want to avoid, in order
|
||||||
// to be as unobtrusive as possible
|
// to be as unobtrusive as possible
|
||||||
|
|
||||||
internal sealed class LegacyScheduledTasks : IApplicationEventHandler
|
internal sealed class LegacyScheduledTasks : ApplicationEventHandler
|
||||||
{
|
{
|
||||||
Timer _pingTimer;
|
Timer _pingTimer;
|
||||||
Timer _publishingTimer;
|
Timer _publishingTimer;
|
||||||
CacheItemRemovedCallback _onCacheRemove;
|
CacheItemRemovedCallback _onCacheRemove;
|
||||||
|
|
||||||
public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, Core.ApplicationContext applicationContext)
|
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, Core.ApplicationContext applicationContext)
|
||||||
{
|
|
||||||
// nothing yet
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnApplicationStarting(UmbracoApplicationBase umbracoApplication, Core.ApplicationContext applicationContext)
|
|
||||||
{
|
{
|
||||||
if (umbracoApplication.Context == null)
|
if (umbracoApplication.Context == null)
|
||||||
return;
|
return;
|
||||||
@@ -48,11 +43,6 @@ namespace Umbraco.Web
|
|||||||
AddTask(LOG_SCRUBBER_TASK_NAME, GetLogScrubbingInterval());
|
AddTask(LOG_SCRUBBER_TASK_NAME, GetLogScrubbingInterval());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnApplicationStarted(UmbracoApplicationBase httpApplication, Core.ApplicationContext applicationContext)
|
|
||||||
{
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Log Scrubbing
|
#region Log Scrubbing
|
||||||
|
|
||||||
// this is a raw copy of the legacy code in all its uglyness
|
// this is a raw copy of the legacy code in all its uglyness
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace Umbraco.Web.Search
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to wire up events for Examine
|
/// Used to wire up events for Examine
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ExamineEvents : ApplicationEventHandler
|
public sealed class ExamineEvents : ApplicationEventHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user