8
8
9
9
namespace WorkflowCore . Services
10
10
{
11
- /// <inheritdoc />
11
+ /// <inheritdoc cref="IWorkflowMiddlewareRunner" />
12
12
public class WorkflowMiddlewareRunner : IWorkflowMiddlewareRunner
13
13
{
14
14
private static readonly WorkflowDelegate NoopWorkflowDelegate = ( ) => Task . CompletedTask ;
@@ -17,23 +17,13 @@ public class WorkflowMiddlewareRunner : IWorkflowMiddlewareRunner
17
17
18
18
public WorkflowMiddlewareRunner (
19
19
IEnumerable < IWorkflowMiddleware > middleware ,
20
- IServiceProvider serviceProvider
21
- )
20
+ IServiceProvider serviceProvider )
22
21
{
23
22
_middleware = middleware ;
24
23
_serviceProvider = serviceProvider ;
25
24
}
26
25
27
-
28
- /// <summary>
29
- /// Runs workflow-level middleware that is set to run at the
30
- /// <see cref="WorkflowMiddlewarePhase.PreWorkflow"/> phase. Middleware will be run in the
31
- /// order in which they were registered with DI with middleware declared earlier starting earlier and
32
- /// completing later.
33
- /// </summary>
34
- /// <param name="workflow">The <see cref="WorkflowInstance"/> to run for.</param>
35
- /// <param name="def">The <see cref="WorkflowDefinition"/> definition.</param>
36
- /// <returns>A task that will complete when all middleware has run.</returns>
26
+ /// <inheritdoc cref="IWorkflowMiddlewareRunner.RunPreMiddleware"/>
37
27
public async Task RunPreMiddleware ( WorkflowInstance workflow , WorkflowDefinition def )
38
28
{
39
29
var preMiddleware = _middleware
@@ -43,15 +33,7 @@ public async Task RunPreMiddleware(WorkflowInstance workflow, WorkflowDefinition
43
33
await RunWorkflowMiddleware ( workflow , preMiddleware ) ;
44
34
}
45
35
46
- /// <summary>
47
- /// Runs workflow-level middleware that is set to run at the
48
- /// <see cref="WorkflowMiddlewarePhase.PostWorkflow"/> phase. Middleware will be run in the
49
- /// order in which they were registered with DI with middleware declared earlier starting earlier and
50
- /// completing later.
51
- /// </summary>
52
- /// <param name="workflow">The <see cref="WorkflowInstance"/> to run for.</param>
53
- /// <param name="def">The <see cref="WorkflowDefinition"/> definition.</param>
54
- /// <returns>A task that will complete when all middleware has run.</returns>
36
+ /// <inheritdoc cref="IWorkflowMiddlewareRunner.RunPostMiddleware"/>
55
37
public async Task RunPostMiddleware ( WorkflowInstance workflow , WorkflowDefinition def )
56
38
{
57
39
var postMiddleware = _middleware
@@ -77,10 +59,15 @@ public async Task RunPostMiddleware(WorkflowInstance workflow, WorkflowDefinitio
77
59
}
78
60
}
79
61
62
+ /// <inheritdoc cref="IWorkflowMiddlewareRunner.RunExecuteMiddleware"/>
63
+ public Task RunExecuteMiddleware ( WorkflowInstance workflow , WorkflowDefinition def )
64
+ {
65
+ throw new NotImplementedException ( ) ;
66
+ }
67
+
80
68
private static async Task RunWorkflowMiddleware (
81
69
WorkflowInstance workflow ,
82
- IEnumerable < IWorkflowMiddleware > middlewareCollection
83
- )
70
+ IEnumerable < IWorkflowMiddleware > middlewareCollection )
84
71
{
85
72
// Build the middleware chain
86
73
var middlewareChain = middlewareCollection
0 commit comments