I was in Unity 1.2, use the following code:
UnityConfigurationSection UnitySection = (UnityConfigurationSection)ConfigurationManager.GetSection("Unity");
Dictionary<string, IUnityContainer> Containers = new Dictionary<string, IUnityContainer>();
foreach (UnityContainerElement element in UnitySection.Containers)
{
IUnityContainer container = new UnityContainer();
Containers.Add(element.Name, container);
element.Configure(Containers[element.Name]);
}
but, I couldn't do so in the Unity 2.0 beta2, because The class 'UnityContainerElement' does not exist in Unity 2 beta2.
How can I do this in the new version?