internal InjectionApiUO(IApiBridge bridge, InjectionApi injectionApi, Metadata metadata, Globals globals, ITimeSource timeSource) { this.bridge = bridge; this.injectionApi = injectionApi; this.globals = globals; Register(metadata); random = new Random(); this.timeSource = timeSource; }
public InjectionRuntime(IApiBridge bridge, IDebuggerServer debuggerServer, ITimeSource timeSource, Func <CancellationToken?> retrieveCancellationToken) { paths = new Paths(() => Path.GetDirectoryName(CurrentScript.FileName)); Api = new InjectionApi(bridge, Metadata, State, timeSource, paths); RegisterNatives(); this.bridge = bridge; this.debuggerServer = debuggerServer; this.timeSource = timeSource; this.retrieveCancellationToken = retrieveCancellationToken; CurrentScript = new ScriptFile("<empty>", string.Empty, null); interpreter = new ThreadLocal <Interpreter>(() => new Interpreter(Metadata, CurrentScript.FileName, debuggerServer.Create(), retrieveCancellationToken)); }
public void Initialize() { timeSource = new TestTimeSource(); injectionApi = new InjectionScript.Runtime.InjectionApi(null, new Metadata(), new Globals(), timeSource); }
public void Initialize() { timeSource = new TestTimeSource(); injectionApi = new InjectionScript.Runtime.InjectionApi(null, new Metadata(), new Globals(), timeSource, new Paths(() => string.Empty), new Objects()); }
public InjectionRuntime(IApiBridge bridge, IDebuggerServer debuggerServer, ITimeSource timeSource) { interpreter = new ThreadLocal <Interpreter>(() => new Interpreter(Metadata, CurrentFileName, debuggerServer.Create())); Api = new InjectionApi(bridge, Metadata, Globals, timeSource); RegisterNatives(); }