Skip to content

Commit

Permalink
feat: Return IServiceCollection from AddGridifyMappers
Browse files Browse the repository at this point in the history
  • Loading branch information
skolmer committed Jun 5, 2024
1 parent 7b8035a commit 4ee025d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Gridify/DependencyInjectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static class DependencyInjectionExtensions
/// <param name="services">The IServiceCollection to which the mappers should be added.</param>
/// <param name="assembly">The assembly to scan for GridifyMapper implementations.</param>
/// <param name="lifetime">The service lifetime for the registered mappers (default is Singleton).</param>
public static void AddGridifyMappers(this IServiceCollection services, Assembly assembly,
public static IServiceCollection AddGridifyMappers(this IServiceCollection services, Assembly assembly,
ServiceLifetime lifetime = ServiceLifetime.Singleton)
{
var mapperType = typeof(GridifyMapper<>);
Expand All @@ -35,5 +35,6 @@ public static void AddGridifyMappers(this IServiceCollection services, Assembly
services.Add(new ServiceDescriptor(interfaceType, mapper, lifetime));
}
}
return services;
}
}

0 comments on commit 4ee025d

Please sign in to comment.