diff --git a/src/AppMotor.Core/Extensions/TypeExtensions.cs b/src/AppMotor.Core/Extensions/TypeExtensions.cs index 76f6e2f7..9cb05bc5 100644 --- a/src/AppMotor.Core/Extensions/TypeExtensions.cs +++ b/src/AppMotor.Core/Extensions/TypeExtensions.cs @@ -321,8 +321,8 @@ public static bool Is(this Type typeToCheck, Type baseOrInterfaceType) // // Try "Type.GetInterface()" first, if possible. // - // "Type.GetInterface()" doesn't work for nested classes (detectable by the "+" in the type name). - if (!baseTypeFullName.Contains('+')) + // "Type.GetInterface()" doesn't work for nested interfaces. + if (!baseOrInterfaceType.IsNested) { try {