Skip to content

Commit b17f8f5

Browse files
author
Bart Koelman
committed
Fixed: do not auto-register abstract base classes and interfaces
1 parent b6870f5 commit b17f8f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JsonApiDotNetCore/Configuration/TypeLocator.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ internal sealed class TypeLocator
8989
private static (Type implementationType, Type serviceInterface)? GetContainerRegistrationFromType(Type nextType, Type unboundInterface,
9090
Type[] interfaceTypeArguments)
9191
{
92-
if (!nextType.IsNested)
92+
if (!nextType.IsNested && !nextType.IsAbstract && !nextType.IsInterface)
9393
{
9494
foreach (Type nextConstructedInterface in nextType.GetInterfaces().Where(type => type.IsGenericType))
9595
{

0 commit comments

Comments
 (0)