Features container

Flexberry UnityFactory is product platform Flexberry and allows a standard way to work with a resolution of containers Unity Container. Use the version of Unity 2.1.

Method CreateContainer() creates a default container to resolve the interface in real authority:

IUnityContainer container = ICSSoft.Services.UnityFactory.CreateContainer();
IService serviceInstance = container.Resolve<IService>();

GetContainer

Method GetContainer(), returns a single (application domain) of the container instance that allows to work correctly with objects of type ContainerControlledLifetimemanager.

IUnityContainer container = ICSSoft.Services.UnityFactory.GetContainer();
IService serviceInstance = container.Resolve<IService>();

Examples of configuration using unity configuration file

Переведено сервисом «Яндекс.Переводчик» http://translate.yandex.ru