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

            new UnityRegistar().Register(container);

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

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

            new UnityRegistar().Register(container);

            var unityAdapter = new UnityServiceLocatorAdapter(container);

            ServiceLocator.SetLocatorProvider(() => unityAdapter);

            return(container);
        }