This project has moved and is read-only. For the latest updates, please go here.

Callback type registry

Feb 21, 2016 at 3:13 PM
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 Type.GetType and indeed, maybe it could be solved in the exact same way?
Sep 16, 2016 at 1:05 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.