Simple Injector v2.4

Rating: No reviews yet
Downloads: 568
Change Set: 105503
Released: Dec 8, 2013
Updated: Jan 14, 2014 by dot_NET_Junkie
Dev status: Stable Help Icon

Recommended Download

Application SimpleInjector Runtime Library v2.4.0.zip
application, 1123K, uploaded Dec 8, 2013 - 382 downloads

Other Available Downloads

Source Code Simple Injector Source Code v2.4.0.zip
source code, 808K, uploaded Dec 8, 2013 - 109 downloads
Documentation SimpleInjector.chm
documentation, 675K, uploaded Dec 8, 2013 - 77 downloads

Release Notes

NOTE: This is NOT the latest release. Please click on the Downloads tab above to find the latest Simple Injector release.

The two big new features for this minor release are the addition of a diagnostic API and support for Windows Phone 8 and Windows Store Apps.

The Diagnostic API (located in the SimpleInjector.Diagnostics.dll) allows querying the container for diagnostic information. Since version 2.0, Simple Injector has allowed developers to show diagnostic information while debugging. The new diagnostic API of v2.4 allows developers to request this information programmatically. This allows writing integration tests that verify the correctness of the container's configuration.

Besides this, there are lots of small improvements and bug fixes in the core library, such as the addition of the abstract ScopedLifestyle base class; the capability to resolve collections as IReadOnlyCollection<T> and IReadOnlyList<T>, and the possibility to register partial open generic types.

New SimpleInjector.Diagnostics.dll

  • A new SimpleInjector.Diagnostics.dll has been added. This dll is included in the core NuGet package.
  • The main entry point is the static Analyzer class.

New features and improvements for the SimpleInjector.dll

  • A ScopedLifestyle abstraction has been added to the core library. The existing scoped lifestyles now inherit from this base class. This allows the container registration to be oblivious to the actual scoped lifestyle implementation. The ScopedLifestyle class adds an WhenScopeEnds an RegisterForDisposal method that users can interact with. (work item 19969)
  • Collections that are registered using one of the RegisterAll overloads can now be injected and resolved as IReadOnlyCollection<T> and IReadOnlyList<T> (.NET 4.5 only). (work item 19992).
  • New RegisterOpenGeneric overloads have been added that allow passing in a predicate that allows determining on a per-type basis whether the registered implementation should be applied. just as can be done using RegisterDecorator. (work item 20284).
  • The RegisterOpenGeneric and RegisterDecorator extension methods now allow registering partial open generic types (Work item 19926).
  • Lifestyle.CreateProducer extension methods were added to make creating InstanceProducer instances easier. (work item 19959).
  • New Lifestyle.CreateHybrid method overload added that accepts two ScopedLifestyle instances and returns a hybrid ScopeLifestyle. (work item 19969)
  • RegisterAll(Type, params Registration) overload added to make registring collections using Registration instances easier. (work item 20001)
  • New convenient Lifestyle.CreateRegistration overloads added that allow supplying a single TConcrete type instead of TService and TImplementation.
  • New Container.RegisterInitializer overload added that allows supplying more information about the context of the created instance. (work item 19824).
  • Container.Register<TConcrete>(Lifestyle) overload has been added. (Work item 20324).
  • InstanceProducer.GetRelationships() method added to allow analyzing a registration's dependencies (Work item 20235).

Bug fixes for the SimpleInjector.dll

  • Scoped lifestyles disposed instances in the wrong order. (work item 20100).
  • Not all created registrations ended up in the debugger diagnostics view. (work item 19954).
  • Visual Basic debugger didn't display debug information. Although fixed, the experience still sucks for VB developers, but at least they can view the information now. (work item 20271)
  • Exception messages often contained the text "No registration for type {0} could be found " even though the type was registered explicitly. (work item 20272).
  • A call to RegisterOpenGeneric could fail because it would try to apply an incompatible implementation, because the generic type constraints weren't always validated correctly.
  • Registration of variant types with RegisterAll failed (Work item 20366).
  • In special cases where one of the registered types in a RegisterAll registration would be an abstract type (which points back to the container), the ExpressionBuilt event wasn't triggered for this abstract type and a decorator for this abstraction would not be applied (only the decorator for the collection type would be applied) (Work item 20367).

Bug fixes for the SimpleInjector.Integration.Wcf.dll

  • WcfOperationLifestyle disposed instances in the wrong order. (work item 20100).

Bug fixes for the SimpleInjector.Integration.Web.dll

  • WebRequestLifestyle disposed instances in the wrong order. (work item 20100).

Bug fixes for the SimpleInjector.Extensions.LifetimeScope.dll

  • LifetimeScope disposed instances in the wrong order. (work item 20100).

Reviews for this release

No reviews yet for this release.