Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
151 lines (127 sloc) 8.59 KB

Rezolver

Rezolver is a fast, efficient, extensible, open source IOC container with Asp.Net Core integration.

The nuget package has binaries specifically targeted to these TFMs:

  • netstandard2.0
  • netcoreapp2.2
  • net472
  • net48

[!TIP] While Rezolver is fast, whichever version you use, the runtime-specific versions (i.e. netcoreapp2.2 or netframework472/48) are faster due to the use of some internal caching built using IL Emit which, until netstandard2.1 is ready, can only be used when directly targeting a specific runtime.

Integration

In addition to simply using the Rezolver nuget package and creating a @Rezolver.Container directly, Rezolver also offers some off-the-shelf integrations:

Quickstart

Read the quickstart tutorial - which shows how to create and use Rezolver containers.

Release Highlights

For full release notes for each version - see release notes on Github.

  • 2.0.0
    • Major performance improvements
    • TFMs changed to netStandard2.0, netcoreapp2.2, net472 and net48 (#78)
    • Scopes are now always present (#89)
    • 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 and @Rezolver.IInstanceProvider`1
    • OverridingContainer renamed to ChildContainer (#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 of IRootTargetContainer
    • OverridingTargetContainer renamed to ChildTargetContainer (#88)
  • 1.4.0
  • 1.3.4
    • Added Sourcelink to the packaged assemblies.
    • Bumped Asp.Net Core integration packages to 2.1
  • 1.3.3
    • Bugfix release - see the release notes linked above for more
  • 1.3.2
  • 1.3.1
    • Added .Net Standard 2.0 support and more.

Feature Overview

Linked topics provide high level overviews and examples in our developer guide - click on them to find out more! (*)

Core Features

Enumerables, Arrays and Collections

Advanced

  • Delegate injection ('autofactories')
  • Lazy injection
  • Generic Variance
    • Generic Contravariance (Action<IFoo> resolved for Action<Foo>)
    • Generic Covariance (Func<Foo> resolved for Func<IFoo>)
    • Mixed Variance (Func<IFoo, Bar> resolved for Func<Foo, IBar>)
    • Can be enabled and disabled globally and per-type
    • (As noted above) Enumerables and collections automatically include all generic variant matches
  • Decorators
    • Non-generic & generic constructor injection
    • Specialised generic (where a decorator for IFoo<> is redecorated by another decorator for IFoo<Bar> only when IFoo<Bar> is requested)
    • Enumerables of decorated instances
    • Decorator Delegates
    • Can decorate any of the built-in enumerable/collection types
  • Constrained generics
  • Child containers
    • Including child registration containers (lower-level overriding of registrations for similar but sibling containers)

Other

  • No 'prepare' phase - you can register targets in a container after you start using it
    • Note - services which have already been used cannot yet be replaced, but mutable containers are planned. In the meantime, you can use child containers to create new registrations which override those of another container.
  • Extensible compiler framework
    • Expression tree compiler used by default
  • Extensible 'targets'
    • Can write your own code which produces objects when Rezolver matches it to a requested type

* If a topic isn't linked, it's probably because we're still working on the documentation, or because it's covered in the parent topic

Quick Links

You can’t perform that action at this time.