You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Service registered with ServiceLifetime.Singleton can be created multiple times #63
I am using LightInject 5.4.0 in aspnet core 2.2 project. I have added LightInject as described in this instruction https://www.lightinject.net/microsoft.aspnetcore.hosting
But my services registered in IServiceCollection. And I have service with expensive controller registered as singletone. So this service's constructor may be called twice (or more) if I request this service for the 1st time and 2nd time within small interval.
Activity
seesharper commentedon Apr 15, 2019
@Cpa3y Do you have more information on this?
Cpa3y commentedon Apr 22, 2019
I am using LightInject 5.4.0 in aspnet core 2.2 project. I have added LightInject as described in this instruction https://www.lightinject.net/microsoft.aspnetcore.hosting
But my services registered in IServiceCollection. And I have service with expensive controller registered as singletone. So this service's constructor may be called twice (or more) if I request this service for the 1st time and 2nd time within small interval.
I have created small demo project https://github.com/Cpa3y/lightinject-issue-demo
seesharper commentedon Apr 22, 2019
@Cpa3y Thanks for the information. Looking into it