public IDictionary <string, IScriptModule> GetPublishedModules()
        {
            IDictionary <string, IScriptModule> result = _manager.Environment.GetPublishedModules();

            string[] keys = new string[result.Count];
            result.Keys.CopyTo(keys, 0);

            foreach (string key in keys)
            {
                result[key] = RemoteWrapper.WrapRemotable <IScriptModule>(result[key]);
            }

            return(result);
        }
Пример #2
0
 public ICompiledCode CompileExpression(string expression, IScriptModule module)
 {
     return(RemoteWrapper.WrapRemotable <ICompiledCode>(_engine.CompileExpression(expression, module)));
 }
Пример #3
0
 public ICompiledCode CompileCode(string code, IScriptModule module)
 {
     return(RemoteWrapper.WrapRemotable <ICompiledCode>(_engine.CompileCode(code, module)));
 }
Пример #4
0
 public ICompiledCode CompileFileContent(string path, IScriptModule module)
 {
     return(RemoteWrapper.WrapRemotable <ICompiledCode>(_engine.CompileFileContent(path, module)));
 }
Пример #5
0
 public ICompiledCode CompileFileContent(string path)
 {
     return(RemoteWrapper.WrapRemotable <ICompiledCode>(_engine.CompileFileContent(path)));
 }
Пример #6
0
 public IScriptModule CompileFile(string path, string moduleName)
 {
     return(RemoteWrapper.WrapRemotable <IScriptModule>(_engine.CompileFile(path, moduleName)));
 }
Пример #7
0
 /// <summary>
 /// TODO: Called under a lock. Should work with the engine via the argument only.
 /// </summary>
 public virtual void EngineCreated(IScriptEngine engine)
 {
     Contract.RequiresNotNull(engine, "engine");
     Debug.Assert(_remoteHost != null);
     _remoteHost.EngineCreated(RemoteWrapper.WrapRemotable <IScriptEngine>(engine));
 }
Пример #8
0
 public ICompiledCode CompileSourceUnit(SourceUnit sourceUnit, IScriptModule module)
 {
     return(RemoteWrapper.WrapRemotable <ICompiledCode>(_engine.CompileSourceUnit(sourceUnit, module)));
 }
 public IScriptModule CompileModule(string name, ScriptModuleKind kind, CompilerOptions options, ErrorSink errorSink, IAttributesCollection dictionary, params SourceUnit[] sourceUnits)
 {
     return(RemoteWrapper.WrapRemotable <IScriptModule>(_manager.Environment.CompileModule(name, kind, options, errorSink, dictionary, sourceUnits)));
 }
 public IScriptModule CreateModule(string name, ScriptModuleKind kind, IAttributesCollection dictionary, params ICompiledCode[] compiledCodes)
 {
     return(RemoteWrapper.WrapRemotable <IScriptModule>(_manager.Environment.CreateModule(name, kind, dictionary, compiledCodes)));
 }
 public IScriptModule CompileModule(string name, params SourceUnit[] sourceUnits)
 {
     return(RemoteWrapper.WrapRemotable <IScriptModule>(_manager.Environment.CompileModule(name, sourceUnits)));
 }
 public IScriptModule CreateModule(string name, params ICompiledCode[] compiledCodes)
 {
     return(RemoteWrapper.WrapRemotable <IScriptModule>(_manager.Environment.CreateModule(name, compiledCodes)));
 }
Пример #13
0
 // throws SerializationException
 public virtual bool TryGetVariable(IScriptEngine engine, SymbolId name, out object value)
 {
     Debug.Assert(_remoteHost != null);
     return(_remoteHost.TryGetVariable(RemoteWrapper.WrapRemotable <IScriptEngine>(engine), name, out value));
 }
Пример #14
0
 public virtual void ModuleCreated(IScriptModule module)
 {
     Contract.RequiresNotNull(module, "module");
     Debug.Assert(_remoteHost != null);
     _remoteHost.ModuleCreated(RemoteWrapper.WrapRemotable <IScriptModule>(module));
 }
Пример #15
0
 public ICompiledCode CompileStatements(string statement, IScriptModule module)
 {
     return(RemoteWrapper.WrapRemotable <ICompiledCode>(_engine.CompileStatements(statement, module)));
 }
Пример #16
0
 public IScriptModule MakeModule(string name)
 {
     return(RemoteWrapper.WrapRemotable <IScriptModule>(_compiledCode.MakeModule(name)));
 }
Пример #17
0
 public ICompiledCode CompileCodeDom(System.CodeDom.CodeMemberMethod code, IScriptModule module)
 {
     return(RemoteWrapper.WrapRemotable <ICompiledCode>(_engine.CompileCodeDom(code, module)));
 }
Пример #18
0
 public ICompiledCode CompileInteractiveCode(string code)
 {
     return(RemoteWrapper.WrapRemotable <ICompiledCode>(_engine.CompileInteractiveCode(code)));
 }
Пример #19
0
 public ICompiledCode CompileSourceUnit(SourceUnit sourceUnit, CompilerOptions options, ErrorSink errorSink)
 {
     return(RemoteWrapper.WrapRemotable <ICompiledCode>(_engine.CompileSourceUnit(sourceUnit, options, errorSink)));
 }
Пример #20
0
 public virtual SourceUnit TryGetSourceFileUnit(IScriptEngine engine, string path, Encoding encoding)
 {
     Debug.Assert(_remoteHost != null);
     return(_remoteHost.TryGetSourceFileUnit(RemoteWrapper.WrapRemotable <IScriptEngine>(engine), path, encoding));
 }