Skip to content

Commit

Permalink
Improve condition
Browse files Browse the repository at this point in the history
  • Loading branch information
skrysmanski committed May 6, 2024
1 parent d8e3e0d commit 02b51fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AppMotor.Core/Extensions/TypeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 02b51fb

Please sign in to comment.