Where UnityContainerElement in Unity 2?

Posted by TheAbdalla on Stack Overflow See other posts from Stack Overflow or by TheAbdalla
Published on 2010-05-05T01:56:54Z Indexed on 2010/05/05 7:58 UTC
Read the original article Hit count: 341

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about Patterns

Related posts about practices