public void InitTestScriptEngine() { var lgf = LoggerFactory.Create(f => { f.AddConsole(); }); _js_engine = new JavaScriptEngine(lgf.CreateLogger <JavaScriptEngine>(), Options.Create(new Interpreter.EngineSetting() { Timeout = 4 })); _python_engine = new PythonScriptEngine(lgf.CreateLogger <PythonScriptEngine>(), Options.Create(new Interpreter.EngineSetting() { Timeout = 4 })); _lua_engine = new LuaScriptEngine(lgf.CreateLogger <LuaScriptEngine>(), Options.Create(new Interpreter.EngineSetting() { Timeout = 4 })); _c_engine = new CScriptEngine(lgf.CreateLogger <CScriptEngine>(), Options.Create(new Interpreter.EngineSetting() { Timeout = 4 })); _sql_engine = new SQLEngine(lgf.CreateLogger <SQLEngine>(), Options.Create(new Interpreter.EngineSetting() { Timeout = 4 })); _csharp_engine = new CSharpScriptEngine(lgf.CreateLogger <CSharpScriptEngine>(), Options.Create(new Interpreter.EngineSetting() { Timeout = 4 })); }
static void Main(string[] ags) { CScriptEngine sharpEngine = new CScriptEngine(); sharpEngine.LoadScriptFile(@"C:\Users\steve\Documents\visual studio 2013\Projects\CIMScript\CIMScript\Sample.cs"); Console.ReadLine(); }