0
我在Unity 1.2,使用下面的代碼:Unity 2中UnityContainerElement的位置?
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]);
}
,但是,我不能在Unity 2.0β2這樣做,因爲 類「UnityContainerElement」不統一2β2存在。
我該如何在新版本中做到這一點?