Sure http://support.castleproject.org/projects/IOC/issues/view/IOC-ISSUE-192
On Jan 27, 3:30 pm, Krzysztof Koźmic <[email protected]> wrote: > Ok, I would actually qualify this for a bug. > Can you add this issue to donjon? > > Krzysztof > > On 2010-01-27 22:43, bling wrote: > > > The constructor for C is called twice, but the return value is the > > same instance. > > > IWindsorContainer k = new WindsorContainer(); > > k.AddFacility<TypedFactoryFacility>(); > > k.Register(Component.For<IFactory>().AsFactory()); > > k.AddComponentLifeStyle<C>(LifestyleType.Singleton); > > k.AddComponentLifeStyle<D>(LifestyleType.Singleton); > > k.AddComponentLifeStyle<E>(LifestyleType.Singleton); > > k.AddComponentLifeStyle<A>(LifestyleType.Transient); > > k.AddComponentLifeStyle<B>(LifestyleType.Transient); > > k.Resolve<C>(); > > > public interface IFactory > > { > > D Create(C c); > > } > > public class A > > { > > } > > public class B > > { > > public B(A a) > > { > > } > > } > > public class C > > { > > public C(B b) > > { > > System.Diagnostics.Trace.WriteLine("ctor"); > > } > > public E E { get; set; } > > } > > public class D > > { > > public D(C c) > > { > > } > > } > > public class E > > { > > public E(C c) > > { > > } > > } -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. 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.
