.Net IOC container built from the ground up to support the .Net Standard 1.1 profile (and therefore supporting Asp.Net Core and Xamarin environments). It's fast, very extensible, and has a lot of cool features. Try it now!
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.
NetStandard2.0
, netcoreapp2.2
, net472
and net48
System.Reflection.Emit
, to work. In theory, once netstandard2.1
is here,2.0
and 2.1
flavours of .Net Standard.Container
class won’t support instance tracking or explicitly scoped registrations. You need to create a scope to do this, unless…ScopedContainer
instead, which creates its own ‘root’ disposable scope on creation. This will be used by default by Asp.Net Core)IResolveContext
-> ResolveContext
IContainer
-> Container
IContainerScope
-> ContainerScope
ICompiledTarget
-> retired for factory delegates, Rezolver.IInstanceProvider
and Rezolver.IInstanceProvider<T>
Resolve
extension methods in favour of concrete methods on the typesIServiceProvider
is now explicitly implemented by all three of Container
, ContainerScope
and ResolveContext
Resolve
method implementations, the behaviour of which is slightly different for each:
Container
instances have a Scope
Container
doesn’t track instances, only child scopesScopedContainer
should be used if you want the root scope to track instances (this is the default for Asp.Net Core and Generic Host integration)Container
uses the scope on the ResolveContext
, but defaults to its own Scope
when calling the Resolve
methods which only take a typeContainerScope
instances have a Container
Scope
routes the call to its own Container
, but with a ResolveContext
which fixes the Scope
to that scope.ResolveContext
now only has a Scope
(the Container
property just proxies the Container from the scope)ResolveContext
routes the call to its own Scope
(and therefore Container
)OverridingContainer
renamed to ChildContainer
(#87)
IRootTargetContainer
on creation. To register new services, you create a new instance and then register into it via its implementation of IRootTargetContainer
OverridingTargetContainer
renamed to ChildTargetContainer
(#88)Lazy<T>
InjectionPrimary 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.
.NetStandard1.1
, .NetStandard2.0
and net45
(Removed net461
as it was pointless)As always, for the full list of changes, check out the version history.
Bugfixes for generics handling, specifically:
Foo<T, U> : IFoo<IBar<T, U>>
against <IFoo<IBar<,>>
caused an IndexOutOfRangeException
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!