Open jirikanda opened 5 years ago
How did you implement ISomeServiceFactory
?
Thanks for the reply.
I do not implement ISomeServiceFactory myself. I am using Castle Windsor's Typed Factory Facility to let it create the implementation at runtime.
container.AddFacility<TypedFactoryFacility>();
container.Register(Component.For<ISomeServiceFactory>().AsFactory());
See https://github.com/castleproject/Windsor/blob/master/docs/typed-factory-facility-interface-based.md
I found that #25 partially solves this problem. Using fix in #25, typed factories work well from the second request.
For the very first request, typed factories still resolve new instances.
I will check this.
Instances from service factories do not respect lifestyle.
Steps to reproduce
Dependencies