/// <summary> /// Reloads the scripts and executes them /// </summary> public void Reload() { // Close any previously open script if (ScriptInstance != null) { ScriptInstance.UnloadOwnerDomain(); ScriptInstance = null; } Data = null; SourceFile.Reload(); SinkFile.Reload(); // Re-load the scripts, pulling in any recent changes LoadScripts(); // Execute the reload callback OnReload(); }
/// <summary> /// Reloads the scripts and executes them /// </summary> public void Reload() { Data = null; SourceFile.Reload(); SinkFile.Reload(); // Re-load the data scripts, pulling in any recent changes Run(this, DataScriptPaths); // Create and get the StockProcessor instance, which also populates the Data field in the session Assembly dataScript; if (Scripts.TryGetValue(this, out dataScript)) { var getProcessor = dataScript.GetStaticMethod("RobinhoodDesktop.Script.StockProcessor.GetInstance", this); var processor = getProcessor(this); // Execute the reload callback if (OnReload != null) { OnReload(); } } }