The library is still fully functional, but will not be updated to future versions of .Net, sorry!
Thanks for all the support :)
Rezolver is a high performance open-source IOC container for .Net Core.
You can get the Rezolver Package from Nuget, and for more packages, head over to the packages documentation.
For more information, including API reference and developer how-tos, head on over to the Rezolver website.
Follow us on twitter for code or documentation updates/release notifications etc.
- TFMs changed for main package (#78):
NetStandard2.0
,netcoreapp2.2
,net472
andnet48
- The targeting of specific runtimes is to allow some more advanced caching technology, based on
System.Reflection.Emit
, to work. In theory, oncenetstandard2.1
is here, these will be able to be removed in favour of simply targeting the2.0
and2.1
flavours of .Net Standard.
- Major performance improvements:
- Enumerables +2500%
- Constructor injection up +368%
- Compilation speed has also been improved.
- Scopes are now always present (#89)
- But, by default, the
Container
class won't support instance tracking or explicitly scoped registrations. You need to create a scope to do this, unless... - You use
ScopedContainer
instead, which creates its own 'root' disposable scope on creation. This will be used by default by Asp.Net Core)
- But, by default, the
- Got rid of a whole bunch of interfaces in favour of concrete classes with non-virtual (where possible) methods (#90):
IResolveContext
->ResolveContext
IContainer
->Container
IContainerScope
->ContainerScope
ICompiledTarget
-> retired for factory delegates,Rezolver.IInstanceProvider
andRezolver.IInstanceProvider<T>
- Got rid of a bunch of
Resolve
extension methods in favour of concrete methods on the types - New Container/Scope/Context behaviour:
IServiceProvider
is now explicitly implemented by all three ofContainer
,ContainerScope
andResolveContext
- All three also have their own
Resolve
method implementations, the behaviour of which is slightly different for each:- All
Container
instances have aScope
- The default root scope used by
Container
doesn't track instances, only child scopes ScopedContainer
should be used if you want the root scope to track instances (this is the default for Asp.Net Core and Generic Host integration)- Resolving through a
Container
uses the scope on theResolveContext
, but defaults to its ownScope
when calling theResolve
methods which only take a type
- The default root scope used by
- All
ContainerScope
instances have aContainer
- Resolving through a
Scope
routes the call to its ownContainer
, but with aResolveContext
which fixes theScope
to that scope.
- Resolving through a
ResolveContext
now only has aScope
(theContainer
property just proxies the Container from the scope)- Resolving through a
ResolveContext
routes the call to its ownScope
(and thereforeContainer
)
- All
OverridingContainer
renamed toChildContainer
(#87)- Constructor now no longer accepts an
IRootTargetContainer
on creation. To register new services, you create a new instance and then register into it via its implementation ofIRootTargetContainer
- Constructor now no longer accepts an
OverridingTargetContainer
renamed toChildTargetContainer
(#88)
- Added Generic Host Support
- Added Autofactory Injection
- Added Automatic
Lazy<T>
Injection - Fixed a critical bug (#77) for Release-build Asp.Net Core Apps
Primary purpose of this release was to have a build that's been built and tested explicitly against the .Net Core 2.1 runtime and Asp.Net Core 2.1.
- Added SourceLink Support
- Core library now targets
.NetStandard1.1
,.NetStandard2.0
andnet45
(Removednet461
as it was pointless)
- Rezolver.Microsoft.AspNetCore.Hosting updated dependency to Asp.Net Core 2.1
- Rezolver.Microsoft.Extensions.DependencyInjection updated dependency to Asp.Net Core 2.1
As always, for the full list of changes, check out the version history.
Bugfixes for generics handling, specifically:
- Singletons matched contravariantly or covariantly did not honour the pattern
- Registering
Foo<T, U> : IFoo<IBar<T, U>>
against<IFoo<IBar<,>>
caused anIndexOutOfRangeException
- Generic covariance
- Mixed variance
- Enumerable Projections
- List member bindings (collection initialisation)
- Selection of constructors on open generics
- Fluent API to build per-member bindings
- Support for Asp.Net Core 2.0
- Contravariance
- Decorator Delegates
- List, Collection and Array injection
- ... Plus loads of bug fixes and other enhancements :)
All these features are documented on our website.
Rezolver has now been incorporated into @DanielPalme's excellent IOCPerformance benchmark.
Read our own notes on Rezolver's performance in this benchmark, which provide some context on the areas where it can be improved.
Hint: Unless you're creating child containers with additional registrations, Rezolver's performance is right up there with the fastest.
Feel free to fork this repo, build from the source, and submit pull requests for new functionality or bugfixes!