Example #1
0
        public static IUnityContainer RegisterComponents()
        {
            var container = new UnityContainer();

            new UnityRegistar().Register(container);

            var unityAdapter = new UnityServiceLocatorAdapter(container);
            ServiceLocator.SetLocatorProvider(() => unityAdapter);

            return container;
        }
Example #2
0
        public static IUnityContainer RegisterComponents()
        {
            var container = new UnityContainer();

            new UnityRegistar().Register(container);

            var unityAdapter = new UnityServiceLocatorAdapter(container);

            ServiceLocator.SetLocatorProvider(() => unityAdapter);

            return(container);
        }