public override void Init() { var actions = new PluginMethodCollection(); foreach (var action in ScriptExecuted) { actions.RegisterMethod(action.Metadata, action.Value); } scriptHost = new ScriptHost(actions, Logger, RunScript); foreach (var plugin in Context.GetAllPlugins()) { GetScriptEvents(plugin); } }
public ScriptHost(PluginMethodCollection methods, Logger logger, Action<string, object[]> scriptRunner) { this.methods = methods; this.logger = logger; this.scriptRunner = scriptRunner; }
public override void Init() { var actions = new PluginMethodCollection(); foreach (var action in ScriptExecuted) { actions.RegisterMethod(action.Metadata, action.Value); } scriptHost = new ScriptHost(actions, Logger, RunScript); foreach (var plugin in Context.GetAllPlugins()) { GetScriptEvents(plugin); } }
public ScriptHost(PluginMethodCollection methods, Logger logger, Action <string, object[]> scriptRunner) { this.methods = methods; this.logger = logger; this.scriptRunner = scriptRunner; }