Mugen Injection [Relationship types]

Dependencies using the types below are interpreted specially by MugenInjection. For example, when MugenInjection is injecting a constructor parameter of type IEnumerable<IBeta> it will not look for a component that supplies IEnumerable<IBeta>. Instead, the container will find all implementations of IBeta and inject all of them.

To override this default behaviour it is still possible to register explicit implementations of these types.

Composing relationship types

Relationship types can be composed:

IEnumerable<Func<Managed<Beta>>>

Is interpreted correctly to mean:

All implementations, of

Factories, that return

Lifetime-controlled

Beta services

Custom relationship types

The custom relationship types in MugenInjection don’t force you to bind your application more tightly to MugenInjection. They give you a programming model for container configuration that is consistent with the way you write other components (vs. having to know a lot of specific container extension points and APIs that also potentially centralise your configuration.)