File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
DotNetToolkit.Repository.Extensions.Microsoft.DependencyInjection
DotNetToolkit.Repository.Extensions.Unity Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,8 @@ public static IServiceCollection AddRepositories([NotNull] this IServiceCollecti
8383 {
8484 var serviceType = t . Key ;
8585 var implementationTypes = t . Where ( x => x . IsGenericType == serviceType . IsGenericType &&
86- x . GetGenericArguments ( ) . Length == serviceType . GetGenericArguments ( ) . Length ) ;
86+ x . GetGenericArguments ( ) . Length == serviceType . GetGenericArguments ( ) . Length &&
87+ x . IsVisible && ! x . IsAbstract ) ;
8788
8889 foreach ( var implementationType in implementationTypes )
8990 {
Original file line number Diff line number Diff line change @@ -82,7 +82,8 @@ public static void RegisterRepositories([NotNull] this IUnityContainer container
8282 {
8383 var serviceType = t . Key ;
8484 var implementationTypes = t . Where ( x => x . IsGenericType == serviceType . IsGenericType &&
85- x . GetGenericArguments ( ) . Length == serviceType . GetGenericArguments ( ) . Length ) ;
85+ x . GetGenericArguments ( ) . Length == serviceType . GetGenericArguments ( ) . Length &&
86+ x . IsVisible && ! x . IsAbstract ) ;
8687
8788 foreach ( var implementationType in implementationTypes )
8889 {
You can’t perform that action at this time.
0 commit comments