Hallo, ich nutze den DependencyInjection Container Unity http://unity.codeplex.com/
Ich möchte meine registrierten Implementierungen zur Laufzeit aus dem ersten Container in ein neuen Container registrieren, ist das überhaupt möglich?
static void Main(string[] args)
{
IUnityContainer container = new UnityContainer();
container.RegisterType<ICustomerService, CustomerService>();
IUnityContainer newContainer = new UnityContainer();
foreach (ContainerRegistration registration in container.Registrations)
{
Type t = registration.RegisteredType;
//Wie kann man das Interface und die Implementierung hier nutzen?
//newContainer.RegisterType<typeof(registration)>();
}
}