From 9ef8e9afc15283b19060dd6dd58477600a9c0b34 Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 9 Jan 2019 10:04:31 +0100 Subject: [PATCH] Cleanup task runner --- .../Scheduling/BackgroundTaskRunner.cs | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs b/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs index 528c87b2bb..b4d122b64f 100644 --- a/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs +++ b/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs @@ -16,19 +16,16 @@ namespace Umbraco.Web.Scheduling public abstract class BackgroundTaskRunner { /// - /// Creates a hook, to hook the task runner into the main domain. + /// Represents a MainDom hook. /// - /// The object. - /// A method to execute when hooking into the main domain. - /// A method to execute when the main domain releases. - /// - public MainDomHook CreateMainDomHook(IMainDom mainDom, Action install, Action release) - { - return new MainDomHook(mainDom, install, release); - } - public class MainDomHook { + /// + /// Initializes a new instance of the class. + /// + /// The object. + /// A method to execute when hooking into the main domain. + /// A method to execute when the main domain releases. public MainDomHook(IMainDom mainDom, Action install, Action release) { MainDom = mainDom; @@ -36,8 +33,19 @@ namespace Umbraco.Web.Scheduling Release = release; } + /// + /// Gets the object. + /// public IMainDom MainDom { get; } + + /// + /// Gets the method to execute when hooking into the main domain. + /// public Action Install { get; } + + /// + /// Gets the method to execute when the main domain releases. + /// public Action Release { get; } internal bool Register()