Registering all the types in an assembly

Nov 14, 2008 at 2:49 PM
Hi all,

This may be a very simple question but I will go and ask:
Is it possible to register all the types in a specific assembly at runtime?

Thanks.
Nov 14, 2008 at 5:53 PM
What you mean by "register all the types"? Unity, unlike most other DI containers, doesn't require any registration out of the box for concrete types. What sort of registration do you want?

There's nothing built into the container to scan assemblies because, given a concrete class Foo, you can do container.Resolve<Foo> and you'll get one without needing to configure the container beforehand.