Пример #1
0
        /// <summary>
        /// 启动所有的 实体插件
        /// </summary>
        internal static void StartupAppPlugins()
        {
            var libraries = GetAppPlugins();

            foreach (var pluginAssembly in libraries)
            {
                //调用 ILibrary
                var library = pluginAssembly.Instance as AppPlugin;
                if (library != null)
                {
                    library.Initialize(_appCore);
                }
            }
            ObjectContainerFactory.SetProvider(new UnityContainerAdapterFactory());
            Composer.RegisterAllPluginsByAttribute();
        }
Пример #2
0
 /// <summary>
 /// 插件的初始化方法。
 /// </summary>
 /// <param name="app">应用程序对象。</param>
 public override void Initialize(IApp app)
 {
     ObjectContainerFactory.SetProvider(new UnityContainerAdapterFactory());
 }