Considering this code :
public class A
{
public B b { get; set; }
}
public class B : IInitializable
{
#region IInitializable Members
public void Initialize()
{
throw new NotImplementedException();
}
#endregion
}
class Program
{
static void Main(string[] args)
{
WindsorContainer container = new WindsorContainer();
container.Register(Component.For<A>());
container.Register(Component.For<B>());
try
{
A a = container.Resolve<A>();
// goes here and a.b is null !!!
}
catch (Exception ex)
{
// never goes here :(
Console.WriteLine(ex);
}
}
}
I would have expected the NotImplementedException to be propagated to the main catch. Instead, the exception is caught by windsor and the property a.b is null...
Any idea to get my exception correctly propagated ?