@@ -15,11 +15,23 @@ protected CakeEngineBase(ICakeEngine implementation)
1515 /// <summary>Registers a new task.</summary>
1616 /// <param name="name">The name of the task.</param>
1717 /// <returns>A <see cref="T:Cake.Core.CakeTaskBuilder`1" />.</returns>
18- public CakeTaskBuilder < ActionTask > RegisterTask ( string name )
18+ public CakeTaskBuilder RegisterTask ( string name )
1919 {
2020 return _engine . RegisterTask ( name ) ;
2121 }
2222
23+ /// <inheritdoc />
24+ public void RegisterSetupAction ( Action < ISetupContext > action )
25+ {
26+ _engine . RegisterSetupAction ( action ) ;
27+ }
28+
29+ /// <inheritdoc />
30+ public void RegisterSetupAction < TData > ( Func < ISetupContext , TData > action ) where TData : class
31+ {
32+ _engine . RegisterSetupAction ( action ) ;
33+ }
34+
2335 /// <summary>
2436 /// Allows registration of an action that's executed before any tasks are run.
2537 /// If setup fails, no tasks will be executed but teardown will be performed.
@@ -40,6 +52,12 @@ public void RegisterTeardownAction(Action<ITeardownContext> action)
4052 _engine . RegisterTeardownAction ( action ) ;
4153 }
4254
55+ /// <inheritdoc />
56+ public void RegisterTeardownAction < TData > ( Action < ITeardownContext , TData > action ) where TData : class
57+ {
58+ _engine . RegisterTeardownAction ( action ) ;
59+ }
60+
4361 /// <summary>
4462 /// Runs the specified target using the specified <see cref="T:Cake.Core.IExecutionStrategy" />.
4563 /// </summary>
@@ -64,6 +82,12 @@ public void RegisterTaskSetupAction(Action<ITaskSetupContext> action)
6482 _engine . RegisterTaskSetupAction ( action ) ;
6583 }
6684
85+ /// <inheritdoc />
86+ public void RegisterTaskSetupAction < TData > ( Action < ITaskSetupContext , TData > action ) where TData : class
87+ {
88+ _engine . RegisterTaskSetupAction ( action ) ;
89+ }
90+
6791 /// <summary>
6892 /// Allows registration of an action that's executed after each task has been run.
6993 /// If a task setup action or a task fails with or without recovery, the specified task teardown action will still be
@@ -75,9 +99,18 @@ public void RegisterTaskTeardownAction(Action<ITaskTeardownContext> action)
7599 _engine . RegisterTaskTeardownAction ( action ) ;
76100 }
77101
102+ /// <inheritdoc />
103+ public void RegisterTaskTeardownAction < TData > ( Action < ITaskTeardownContext , TData > action ) where TData : class
104+ {
105+ _engine . RegisterTaskTeardownAction ( action ) ;
106+ }
107+
108+ /// <inheritdoc />
109+ IReadOnlyList < ICakeTaskInfo > ICakeEngine . Tasks => _engine . Tasks ;
110+
78111 /// <summary>Gets all registered tasks.</summary>
79112 /// <value>The registered tasks.</value>
80- public IReadOnlyList < CakeTask > Tasks => _engine . Tasks ;
113+ public IReadOnlyList < ICakeTaskInfo > Tasks => _engine . Tasks ;
81114
82115 /// <summary>Raised during setup before any tasks are run.</summary>
83116 public event EventHandler < SetupEventArgs > Setup
0 commit comments