Simple Injector v4.9 Release Notes
Release Date: 2020-01-06 // about 4 years ago-
๐ Release Notes
๐ฆ Simple Injector can be downloaded using NuGet.
๐ The most prominent improvements in this release are:
- Core library:
- Support for using
ReadOnlyCollection<T>
in the core library. - The container's Lifestyle Mismatch verification behavior can now be set to a less strict model allowing
Transient
dependencies to be injected intoScoped
consumers using theContainer.Options.UseLoosenedLifestyleMismatchBehavior
configuration switch.
- Support for using
- ASP.NET Core integration:
- The container is now automatically disposed on web application shutdown, unless overridden using
services.AddSimpleInjector(container, options => { options.DisposeContainerWithServiceProvider = false; })
. - Scoped
IAsyncDisposable
components, created by Simple Injector during the course of a web request, will now be automatically, and asynchronously disposed.
- The container is now automatically disposed on web application shutdown, unless overridden using
๐ Improvements
Simple Injector core library
- ๐ #762 Support for resolving and injecting
ReadOnlyCollection<T>
collections added - #781 Reports existing interface registrations when
Options.ResolveUnregisteredConcreteTypes
is false - ๐ #793 Added option to loosen the Lifestyle Mismatch verification behavior.
๐ฆ ServiceCollection Integration package
- #787 The
Container
instance is now automatically appended to theIServiceCollection
to simplify some integration scenarios.
๐ฆ ASP.NET Core Integration packages
- #763 Allow Simple Injector container to be automatically disposed when integrated into ASP.NET Core
- ๐ฆ #778 Added support for
IAsyncDisposable
. The ASP.NET Core integration package will now automatically do asynchronous disposal of scopedIAsyncDisposable
dependencies within the context of a web request. - ๐ #730 Fixed an invalid message in an
ObsoleteAttribute
- #794 Some obsoleted messages are now marked with
error: true
and now cause compile errors.
The following class members are now marked obsolete:
SimpleInjectorAspNetCoreMvcIntegrationExtensions.RegisterMvcControllers(Container, IApplicationBuilder)
SimpleInjectorAspNetCoreMvcIntegrationExtensions.RegisterMvcViewComponents(Container, IApplicationBuilder)
SimpleInjectorAspNetCoreMvcIntegrationExtensions.RegisterMvcViewComponents(Container, IViewComponentDescriptorProvider)
SimpleInjectorAspNetCoreMvcIntegrationExtensions.AddSimpleInjectorTagHelperActivation
SimpleInjectorAspNetCoreMvcIntegrationExtensions.RegisterPageModels
SimpleInjectorAspNetIntegrationExtensions.EnableSimpleInjectorCrossWiring(IServiceCollection, Container)
SimpleInjectorAspNetIntegrationExtensions.CrossWire<TService>(Container, IApplicationBuilder)
SimpleInjectorAspNetIntegrationExtensions.CrossWire(Container, Type, IApplicationBuilder)
SimpleInjectorAspNetIntegrationExtensions.AutoCrossWireAspNetComponents(Container, IApplicationBuilder)
SimpleInjectorAspNetIntegrationExtensions.AutoCrossWireAspNetComponents(Container, IServiceProvider)
SimpleInjectorUseOptionsAspNetCoreExtensions.UseMiddleware<TMiddleware>(SimpleInjectorUseOptions, IApplicationBuilder)
SimpleInjectorUseOptionsAspNetCoreExtensions. UseMiddleware(SimpleInjectorUseOptions, Type, IApplicationBuilder)
- Core library: