With Unity, ResolveAll allows each registered mapping for an interface other than the default mapping.
therefore, if you are registered:
container.RegisterType<IInterface, ActualClassOne>(new ContainerControlledLifetimeManager()); container.RegisterType<IInterface, ActualClassOne>("Singleton", new ContainerControlledLifetimeManager()); container.RegisterType<IInterface, ActualClassOne>("Trans", new TransientLifetimeManager());
ResolveAll () will only give you IEnumerable containing the allowed "Singleton" and "Trans" mappings
Luken
source share