Skip to content

Commit

Permalink
Merge pull request danielgerlag#160 from Kahbazi/master
Browse files Browse the repository at this point in the history
Set IServiceCollection as return type for AddWorkFlow
  • Loading branch information
danielgerlag authored Jul 22, 2018
2 parents 9a7ae01 + 41403dc commit 259bcf1
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 259bcf1

Please sign in to comment.