NOTE: Simple Injector v1.6.0 NOT the latest release. Please click on the Downloads tab above to find the latest Simple Injector release.
This release fixes a few minor bugs in the core and Extensions libraries and changed the behaviors of the Per Web Request
(RegisterPerWebRequest) and Per Lifetime Scope
(RegisterLifetimeScope) lifestyles that are available in the extension packages.Bug fixes in this release for the SimpleInjector.dll
Bug fixes in this release for the SimpleInjector.Extensions.dll
- Calling GetService(Type) and GetRegistration(Type) with type being IEnumerable<> failed instead of returning null.
- Injecting properties could fail under .NET 4.0 and up under certain specific conditions. (work item 18909)
- Building a friendly name for an exception message failed for types nested in a generic type. The original error was lost.
- GetInstance(Type) threw a less expressive exception as GetInstance<TService>() when a type could not be resolved. (work item 18542)
Changes in this release for the SimpleInjector.Integration.Web.dll
- RegisterOpenGeneric allowed registering types that could never be resolved (for instance when they had multiple constructors). An ArgumentException is now thrown during registration.
- An implementation type registered using RegisterOpenGeneric that could not be resolved (because for instance it has unregistered dependencies) caused a NullReferenceException.
Changes in this release for the SimpleInjector.Extensions.LifetimeScoping.dll
- A new PerWebRequestInstanceCreator<TService> type has been added to allow making it easier to register generic types (registered using RegisterOpenGeneric or RegisterDecorator) with the Per Web Request lifetime.
- An exception is thrown when a Per Web Request registered instance is requested outside the context of a HTTP request (when HttpContext.Current is null). The previous release returned a transient, but this would easily lead to hard to track errors and is hardly ever the behavior the user needs.
Bug fixes in this release for the SimpleInjector.Integration.Wcf.dll
- An exception is thrown when a Per Lifetime Scope registered instance is requested outside the context of a lifetime scope. The previous release returned a singleton, but this would easily lead to hard to track errors. This was hardly ever the behavior the user needs.
- Registrations made using BeginWcfOperationScope can now be tested using Container.Verify.