Im using the unity container as part of the WPF composite application guidance.
I have modules that register a number of types of classes with the same interface.
container_.RegisterType<ICustomer, InternalCustomer>( "InternalCustomer")
This allows me to later create an instance of a type by just specifying the type name to the container eg:
var cust = container_.Resolve<ICustomer>("ExternalCustomer")
I want my main shell application to display a list of all the available ICustomer types in the container. However, it appears the closest I can come is calling:
var lst = container_.ResolveAll<ICustomer>();
which means I need to actually instantiate all those objects in order to see which are in the container.
What Im really looking for is a method like container_.FindTypes<ICustomer> or something that can just return all the types for a particular interface.
This has been implemented in Unity 2.0. See the latest drop.