Question

I'm trying to figure out how to have Castle Windsor resolve dependancies for objects created using Activator.CreateInstance.

Currently when I create objects this way, the dependancies inside the created object do not get resolved. I've had a search around to see if there's a Windsor method that does the same thing whilst also resolving the dependancies but I haven't found anything thus far.

As for why I'm creating instances this way, I'm playing about with a basic text game for a bit of fun and the instances are being created based on user input commands and so I need to create the instance based on a string (currently the command is mapped in a Dictionary to a type which is then created using the above method).

Thanks for any and all help.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top