/// <summary> /// Runs the plugin stage with the specififed type /// </summary> /// <param name="type"></param> /// <param name="stage">The stage of the current processing</param> /// <param name="script">the script to be processed</param> /// <param name="sourceManager"></param> /// <param name="defTable">the definitions that are used</param> /// <returns>True if the operation completed successfully</returns> private bool RunPluginStage(PluginType type, ProcessStage stage, ISourceScript script, ISourceManager sourceManager, IDefinitions defTable) { List <AbstractPlugin> chain = AbstractPlugin.GetPluginsForStage(plugins, type, stage); bool ret = true; if (type == PluginType.FullScriptPlugin) { ret = RunFullScriptStage(chain, stage, script, sourceManager, defTable); } else if (type == PluginType.LinePluginBefore || type == PluginType.LinePluginAfter) { string[] src = script.GetSource(); RunLineStage(chain, stage, src); script.SetSource(src); } if (!ret) { return(false); } return(true); }
/// <summary> /// Runs the plugin stage with the specififed type /// </summary> /// <param name="type"></param> /// <param name="stage">The stage of the current processing</param> /// <param name="script">the script to be processed</param> /// <param name="sourceManager"></param> /// <param name="defTable">the definitions that are used</param> /// <returns>True if the operation completed successfully</returns> private bool RunPluginStage(PluginType type, ProcessStage stage, ISourceScript script, ISourceManager sourceManager, IDefinitions defTable) { List <AbstractPlugin> chain = AbstractPlugin.GetPluginsForStage(_plugins, type, stage); bool ret = true; if (type == PluginType.FULL_SCRIPT_PLUGIN) { ret = RunFullScriptStage(chain, stage, script, sourceManager, defTable); } else if (type == PluginType.LINE_PLUGIN_BEFORE || type == PluginType.LINE_PLUGIN_AFTER) { string[] src = script.GetSource(); RunLineStage(chain, stage, src); script.SetSource(src); } if (!ret) { return(false); } return(true); }