I wrote many, many moons ago about doing auto-mapping in Unity using e.g. reflection etc. instead of resorting to config files etc..
Well I’ve now released, via NuGet, a package that offers exactly that. It’s not the most configurable API but supports what I believe are the most common use-cases for auto registration, allowing you to get up and running in seconds. Just download the package, call a single extension method and off you go.
Simple API exposed as extension methods on the Unity Container itself – up and running in seconds
Automatically registers multiple types based on interface implementations – no naming conventions required
Automatically registers types located across multiple assemblies – perfect for implementing DIP easily without breaking rules of encapsulation
So, if you use Unity, download the package and give it a go – I’d love to hear your feedback (good and bad!).