Exemplo n.º 1
0
        /// <summary>
        /// 私有构造方法
        /// </summary>
        private UnityApplication(HashSet <ObjectIOCTypeInfo> lstInputIocInfo = null)
        {
            m_useAssemblyService = ServiceProxyFactory.CreatProxy <ICoreAssemblyService>(new CoreAssemblyServiceImp());

            var useTypeService = m_useAssemblyService.UseTypeServie;

            //获取所有程序集
            var aLLAssemblies = AppDomain.CurrentDomain.GetAssemblies();

            if (null != lstInputIocInfo)
            {
                foreach (var oneInfo in lstInputIocInfo)
                {
                    useTypeService.RegistOneObjectInfo(oneInfo);
                }
            }

            foreach (var oneAssemblies in aLLAssemblies)
            {
                m_useAssemblyService.RegistOneAssembly(oneAssemblies);
            }
        }
 internal CoreAssemblyServiceImp()
 {
     //初始化
     m_useTypeService = ServiceProxyFactory.CreatProxy <ICoreTypeService>(new CoreTypeServiceImp());
 }