Checking unity container type registrations programmatically
<p>I use the unity container to resolve dependencies within an application. </p>

<p>The dependencies and their dependencies (and so on) are registered in the app.config as I need to be able to change the way the application behaves in production.</p>

<p>Sometimes, type registrations for the dependencies are missed, and this only comes to light when an instance of a type is resolved during the application's life time, which means that there may be problems that can only be picked up during integration testing - which is not ideal.</p>

<p>I want to be able to programmatically check (maybe as part of a CI build process) that the unity type registrations have been made correctly. By this I mean that if I resolve an instance of a type, I can have confidence that that type's dependencies (via constructor injection) are also registered and will be resolved.</p>

<p>I only need to check the default built configuration, changes made on live sites are not a consideration here. Also - I don't want to use hard-coded unity registrations.</p>

<p>The only way I can think of doing this at the moment is to parse the unity config file and try to resolve each instance of the type's found...</p>

<p>Is there an easier way of validating that unity registrations are ALL present?</p>