seesharper / LightInject.Microsoft.DependencyInjection

Implements Microsoft.Extensions.DependencyInjection.Abstraction
MIT License
47 stars 13 forks source link

Pass rootscope from PerRootScopeLifeTime #161

Closed seesharper closed 3 years ago

seesharper commented 3 years ago

This PR fixes a bug where we injected a scoped instance into a singleton. The scoped instance got disposed under the feet of the singleton when we disposed the scope and we discovered an error related to accessing a disposed object. Yet another test that should have been covered by the tests provided by Microsoft.Extensions.DependencyInjection.Specification.Tests 👍