/// <summary> /// Execute code within a given module context and returns the result. /// The module must be local with respect to the compiled code object. /// </summary> public object Evaluate(IScriptModule module) { ScriptModule localModule; if (module == null) { localModule = RemoteWrapper.TryGetLocal <ScriptModule>(ScriptDomainManager.CurrentManager.Host.DefaultModule); } else { localModule = RemoteWrapper.GetLocalArgument <ScriptModule>(module, "module"); } return(_code.Run(localModule)); }
// Gets a LanguageContext for the specified module that captures the current state // of the module which will be used for compilation and execution of the next piece of code against the module. private CodeContext GetCodeContext(IScriptModule module) { return(GetCodeContext(RemoteWrapper.GetLocalArgument <ScriptModule>(module ?? ScriptDomainManager.CurrentManager.Host.DefaultModule, "module"))); }
public void PublishModule(IScriptModule module, string publicName) { _manager.PublishModule(RemoteWrapper.GetLocalArgument <ScriptModule>(module, "module"), publicName); }