Would it be possible to have a callback mechanism for type registry instead of it being just a dictionary? I often find myself in the situation where users want to write type names in their scripts. Most of the time the host would actually know how to
resolve the name, but it doesn't necessarily make sense to register all possible names
explicitly by default.
I'm thinking about the case where a user would be able to specify which Assembly
(or namespace) to resolve types from. In this case, you don't necessarily want to go through all the types in the assembly and add them in the registry... it would
be much nicer if we could register a callback with ExpressionEvaluator
for type resolution.
In this way, whenever ExpressionEvaluator
needs a type, the callback can do the resolution.
This is somewhat similar to the type resolution mechanism that is now included for
and indeed, maybe it could be solved in the exact same way?