Skip to content

Commit 41403dc

Browse files
committed
Set IServiceCollection as return type for AddWorkFlow
1 parent 9a7ae01 commit 41403dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/WorkflowCore/ServiceCollectionExtensions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace Microsoft.Extensions.DependencyInjection
1616
{
1717
public static class ServiceCollectionExtensions
1818
{
19-
public static void AddWorkflow(this IServiceCollection services, Action<WorkflowOptions> setupAction = null)
19+
public static IServiceCollection AddWorkflow(this IServiceCollection services, Action<WorkflowOptions> setupAction = null)
2020
{
2121
if (services.Any(x => x.ServiceType == typeof(WorkflowOptions)))
2222
throw new InvalidOperationException("Workflow services already registered");
@@ -47,6 +47,8 @@ public static void AddWorkflow(this IServiceCollection services, Action<Workflow
4747
services.AddTransient<IDefinitionLoader, DefinitionLoader>();
4848

4949
services.AddTransient<Foreach>();
50+
51+
return services;
5052
}
5153
}
5254
}

0 commit comments

Comments
 (0)