/// <summary> /// Loads the collected PlugIns by calling the <see cref="IPlugIn.Initialize"/> method. /// </summary> public void InitializePlugIns() { if (PlugIns != null) { foreach (PlugInData plugInData in PlugIns) { IPlugIn plugIn = plugInData.PlugIn; if (plugIn != null) { try { plugIn.Initialize(this); } catch (System.Exception e) { throw e; } } } } }
/// <summary> /// 安装插件 /// </summary> public void InstallPlugIn(IPlugIn plugIn) { if (plugIn != null) { _installedPlugInList.Add(plugIn); _installedPlugInMap.Add(plugIn.Guid, plugIn); plugIn.Initialize(this); } }