File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Src/Xer.Cqrs.Extensions.Microsoft.DependencyInjection Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,7 @@ namespace Microsoft.Extensions.DependencyInjection
66{
77 public static class ServiceCollectionExtensions
88 {
9- public static IServiceCollection AddCqrs ( this IServiceCollection serviceCollection , Assembly assembly )
10- {
11- return AddCqrs ( serviceCollection , new [ ] { assembly } ) ;
12- }
13-
14- public static IServiceCollection AddCqrs ( this IServiceCollection serviceCollection , IEnumerable < Assembly > assemblies )
9+ public static IServiceCollection AddCqrs ( this IServiceCollection serviceCollection , params Assembly [ ] assemblies )
1510 {
1611 AddCqrsCore ( serviceCollection )
1712 . AddCommandHandlers ( select =>
@@ -26,6 +21,11 @@ public static IServiceCollection AddCqrs(this IServiceCollection serviceCollecti
2621
2722 public static ICqrsBuilder AddCqrsCore ( this IServiceCollection serviceCollection )
2823 {
24+ if ( serviceCollection == null )
25+ {
26+ throw new System . ArgumentNullException ( nameof ( serviceCollection ) ) ;
27+ }
28+
2929 return new CqrsBuilder ( serviceCollection ) ;
3030 }
3131 }
You can’t perform that action at this time.
0 commit comments