Take the following useless program:
class Program
{
static void Main(string[] args)
{
IUnityContainer unityContainer = new UnityContainer();
IWindsorContainer windsorContainer = new WindsorContainer();
Program unityProgram = unityContainer.Resolve<Program>();
Program castleProgram = windsorContainer.Resolve<Program>();
}
}
The UnityContainer will return me an instance of Program, where as the Windsor container will throw a ComponentNotFoundException.
I can see arguments for both behaviours and don't mind which I end up with, however Prism V2 Drop 8 (the latest at time of writing) relies on the Unity behaviour internally, requesting classes that haven't been registered.
Rather than find and register all these classes for Prism I'd much rather just make Windsor behave like Unity. I haven't found anything on google to help me do this (although my terminology may be wrong) and the Windsor documentation is quite bad...
Can anyone suggest a solution to this problem?