ContextHolder ContextType shows classes that are not derived from Context
Issue #108
closed
Hello,
I’ve run into an issue with ContextType dropdown showing classes that do not derive from Context.
I’m not sure if this is intended, but it is causing issues with binding since it leads to binding to properties from other context class and I believe the issue is in TypeInfoUtils.FindTypesWithBase.
Currently, it is looking for types that are baseType.IsAssignableFrom
I changed it to type => type.IsSubclassOf(baseType) || type == baseType
locally, and now my ContextType drop-down only shows classes that are derived from Context.
Comments (4)
-
repo owner -
repo owner @Keith Leung I had a look, but I could not find a case where a wrong type showed up. Could you send me some examples of types that were wrongly shown in the drop down?
-
repo owner Closing this as I could not reproduce it.
-
repo owner - changed status to closed
- Log in to comment
@Keith Leung Thanks again for your report. I will hopefully soon have time to check if this was intended. If not, your suggestion sounds like a good solution.