From 02b51fb51ebcd75a70d7c53ecdac27c991147a69 Mon Sep 17 00:00:00 2001 From: Sebastian Krysmanski Date: Mon, 6 May 2024 07:54:28 +0200 Subject: [PATCH] Improve condition --- src/AppMotor.Core/Extensions/TypeExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 {