Skip to content

Conversation

@Ted-Jin-Lab
Copy link

Enhances the IsOrInheritsFrom extension method to correctly handle scenarios where the otherType parameter is an open generic type definition (e.g., typeof(List<>) or typeof(IMyInterface<,>)).

This allows users to check if a specific type (e.g., MyList<int>) inherits from or implements a generic base type/interface without specifying the type arguments.

Fixes #1337

Enhances the `IsOrInheritsFrom` extension method to correctly handle scenarios where the `otherType` parameter is an open generic type definition (e.g., `typeof(List<>)` or `typeof(IMyInterface<,>)`).

This allows users to check if a specific type (e.g., `MyList<int>`) inherits from or implements a generic base type/interface without specifying the type arguments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Generic Type in DependsOnAllModulesInheritingFrom doesn't work

1 participant