Closed kshi219 closed 5 years ago
It is registered several times by different interfaces. To prevent multiple disposals external lifetime is used
I see. So in our use case we ran into an issue where unless we explicitly held onto a reference of the service provider returned by BuildServiceProvider, like by injecting it into our unity container with ContainerControlledLifeTimeManager, the ServiceProvider would be garbage collected and cause runtime issues. Which led to to this question about what the intended usage pattern should be.
I would need a code sample to verify your scenario and to fix the issue
Hi, was away over the weekend, will make one up soon
Hi,
What is the motivation is behind using ExternallyControlledLifetimeManager in the constructor of ServiceProvider? Is it intended that the constructed service provider be explicitly injected by the user into the container with a some chosen lifetime?
Thanks!