public Camera(ScriptEngine scriptEngine, IApplicationContext context) { _scriptEngine = scriptEngine; _context = context; Size = 200; }
public static object RunTest(String address, String entryPoint, String fileName, string reportath, string resourcePath) { object result = null; if (File.Exists(fileName)) { using (Stream scriptStream = File.OpenRead(fileName)) { Engine = BitMobile.Script.ScriptEngine.LoadScript(scriptStream, entryPoint, DateTime.Now); Console console = new Console(reportath, Engine); Engine.AddVariable("Console", console); Engine.AddVariable("Device", new Device(address, console, resourcePath)); Engine.AddVariable("Stopwatch", new Stopwatch()); Engine.AddVariable("Dialog", new Dialog(address, console)); result = Engine.CallFunction(entryPoint); } return(result); } else { throw new Exception("Test file does not exist"); } }
public Console(string reportPath, BitMobile.Script.ScriptEngine engine) { _reportPath = reportPath; _engine = engine; CommandPause = 1000; }
public static ScriptEngine LoadScript(System.IO.Stream scriptStream, String name, DateTime lastWriteTime) { if (scripts.ContainsKey(name)) { if (scriptsTime[name] < lastWriteTime) { scripts.Remove(name); scriptsTime.Remove(name); } } if(scripts.ContainsKey(name)) return scripts[name]; else { ScriptEngine engine = new ScriptEngine(); scripts.Add(name,engine); scriptsTime.Add(name, lastWriteTime); if(scriptStream!=null) engine.Run(new System.IO.StreamReader(scriptStream)); return engine; } }
public Gallery(IApplicationContext context, ScriptEngine engine) { _context = context; _scriptEngine = engine; Size = 200; }
public FileSystem(ScriptEngine scriptEngine, IApplicationContext context) { _scriptEngine = scriptEngine; _context = context; ReadFsLog(); }
public static ScriptEngine LoadScript(System.IO.Stream scriptStream, String name, BitMobile.Debugger.IDebugger debugger) { if (scripts.ContainsKey(name)) return scripts[name]; else { ScriptEngine engine = new ScriptEngine(name, debugger); scripts.Add(name, engine); if (scriptStream != null) engine.Run(new System.IO.StreamReader(scriptStream)); return engine; } }
public static object RunTest(String address, String entryPoint, String fileName, string reportath, string resourcePath) { object result = null; if (File.Exists(fileName)) { using (Stream scriptStream = File.OpenRead(fileName)) { Engine = BitMobile.Script.ScriptEngine.LoadScript(scriptStream, entryPoint, DateTime.Now); Console console = new Console(reportath, Engine); Engine.AddVariable("Console", console); Engine.AddVariable("Device", new Device(address, console, resourcePath)); Engine.AddVariable("Stopwatch", new Stopwatch()); Engine.AddVariable("Dialog", new Dialog(address, console)); result = Engine.CallFunction(entryPoint); } return result; } else throw new Exception("Test file does not exist"); }
public BarcodeScanner(ScriptEngine scriptEngine, IApplicationContext context) { _scriptEngine = scriptEngine; _context = context; }
public Console(ScriptEngine scriptEngine, IApplicationContext context) { _scriptEngine = scriptEngine; _context = context; }
public MethodInvoker(ScriptEngine engine) { _engine = engine; }
public void Init(ScriptEngine scriptEngine)//, GlobalEventsController globalEventsController) { this.scriptEngine = scriptEngine; }
public void SetContext (object context) { this.context = (ScriptEngine)context; }