Sure, here is the failing:
public class Transient
{
private readonly Singleton _singleton;
public Transient(Singleton singleton)
{
_singleton = singleton;
}
}
public class Singleton
{
public Singleton()
{
throw new Exception("Cannot create singleton object.");
}
}
private void test()
{
IWindsorContainer testContainer = new WindsorContainer();
testContainer.Register(
Component.For<Singleton>(),
Component.For<Transient>().LifeStyle.Transient);
Transient transientInstance = null;
try
{
transientInstance = testContainer.Resolve<Transient>();
}
catch
{
// Do something here.
}
finally
{
testContainer.Release(transientInstance);
testContainer.Dispose();
}
}
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/castle-project-users/-/p0jiAQn5V40J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.