Skip to content

Commit

Permalink
Set IServiceCollection as return type for AddWorkFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
Kahbazi committed Jul 21, 2018
1 parent 9a7ae01 commit 41403dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/WorkflowCore/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Microsoft.Extensions.DependencyInjection
{
public static class ServiceCollectionExtensions
{
public static void AddWorkflow(this IServiceCollection services, Action<WorkflowOptions> setupAction = null)
public static IServiceCollection AddWorkflow(this IServiceCollection services, Action<WorkflowOptions> setupAction = null)
{
if (services.Any(x => x.ServiceType == typeof(WorkflowOptions)))
throw new InvalidOperationException("Workflow services already registered");
Expand Down Expand Up @@ -47,6 +47,8 @@ public static void AddWorkflow(this IServiceCollection services, Action<Workflow
services.AddTransient<IDefinitionLoader, DefinitionLoader>();

services.AddTransient<Foreach>();

return services;
}
}
}
Expand Down

0 comments on commit 41403dc

Please sign in to comment.