Injection other collection types
As described in the enumerables section, Rezolver can automatically
build and inject instances of
IEnumerable<T> of generic and non-generic types based
purely off the registrations within the container.
Sometimes, however, you might also want to inject arrays, lists or collections (using
such types such as
Collection<T> etc) whose contents are
also built automatically purely from the registrations of the type
T present in the
The functionality described in this section does not supersede your ability to create explicit registrations for these types.
By default Rezolver has the ability to automatically build and inject the following types which are commonly used to represent series of objects:
List<T>, <xref:System.Collections.Generic.IList`1>, <xref:System.Collections.Generic.IReadOnlyList`1> -
The key thing to note about Rezolver's implementation of these is that they all, in
some way, rely upon the injection of
IEnumerable<T> mentioned at the start of this topic
and, in some cases, rely on each other.