public void Close(bool fInteractive) { this.iRefCount--; if (this.iClosingCount == 0) { this.pluginServer.ClearEvents(); } foreach (Plugin plugin in this.dicPluginInstances.Values) { if ((plugin.PluginInformation != null) && (fInteractive ^ (plugin.PluginInformation.PluginType != PluginType.Interactive))) { plugin.Close(EndCode.WindowClosed); } } if (!fInteractive) { this.plgIFilter = null; this.plgFilterCore = null; } if (this.iRefCount == 0) { this.dicPluginInstances.Clear(); this.pluginServer.Dispose(); this.pluginServer = null; } this.iClosingCount++; }
private void LoadStartupPlugins() { foreach (PluginInformation information in PluginInformations) { if (!information.Enabled) { continue; } if (information.PluginType == PluginType.Background) { Plugin plugin = this.Load(information, null); if (plugin != null) { if (this.plgIFilter == null) { this.plgIFilter = plugin.Instance as QTPlugin.IFilter; } if (this.plgFilterCore == null) { this.plgFilterCore = plugin.Instance as QTPlugin.IFilterCore; } } else { information.Enabled = false; } continue; } if ((information.PluginType == PluginType.BackgroundMultiple) && (this.Load(information, null) == null)) { information.Enabled = false; } } }
public void RefreshPluginAssembly(PluginAssembly pa, bool fStatic) { foreach (PluginInformation information in pa.PluginInformations) { if (!information.Enabled) { this.UnloadPluginInstance(information.PluginID, EndCode.Unloaded, fStatic); continue; } if (information.PluginType == PluginType.Background) { if (!this.PluginInstantialized(information.PluginID)) { Plugin plugin = this.Load(information, pa); if (plugin != null) { if (this.plgIFilter == null) { this.plgIFilter = plugin.Instance as QTPlugin.IFilter; } if (this.plgFilterCore == null) { this.plgFilterCore = plugin.Instance as QTPlugin.IFilterCore; } } else { information.Enabled = false; } } continue; } if (information.PluginType == PluginType.BackgroundMultiple) { if (!this.PluginInstantialized(information.PluginID) && (this.Load(information, pa) == null)) { information.Enabled = false; } } else if ((fStatic && (information.PluginType == PluginType.Static)) && !dicStaticPluginInstances.ContainsKey(information.PluginID)) { LoadStatics(information, pa, false); } } }
public void ClearFilterEngines() { this.plgIFilter = null; this.plgFilterCore = null; }