public DownloadManager(IManagerSettings Settings) { mainTh = new Thread(Execute); Core.Core.globalCTS.Token.Register(() => _ready.Set()); mainTh.Start(); Core.Core.DataLoaders.CollectionChanged += DataLoaders_CollectionChanged; }
/// <summary> /// Creates a new Runtime Manager Pool. /// </summary> /// <param name="settings">Settings to apply to the Runtime Manager.</param> public ManagerPool(IManagerSettings settings) { if(settings == null) throw new ArgumentNullException("settings", "Settings must be supplied to the RuntimePool."); _settings = settings; }
public ButtonPannel(ChromiumWebBrowser brower, ChromiumWebBrowser _debuggerBrower, int DebuggerPort, Action <LogLevel, string, string> logAction, Action clearLog, Action <ChromiumWebBrowser, Action> AddChrome) { this.logAction = logAction; this.ClearLog = clearLog; init(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TabrisWinform)); this.codemirrow = brower; this.debuggerBrower = _debuggerBrower; debuggerPort = DebuggerPort; this.codemirrow.AllowDrop = true; this.codemirrow.MenuHandler = new JSFunc(this); this.debuggerBrower.MenuHandler = new DebugJSFunc(this); codemirrow.RegisterJsObject("csharpJsFunction", new JSFunc(this), new BindingOptions { CamelCaseJavascriptNames = false }); this.Dock = System.Windows.Forms.DockStyle.Fill; RightBottom = ((System.Drawing.Image)(resources.GetObject("dSkinPanel3.RightBottom"))); this.BackColor = System.Drawing.Color.Transparent; this.Controls.Add(this.reloadRuntime); this.Controls.Add(this.btExcutorSelected); this.Controls.Add(this.btnExcutor); this.Controls.Add(this.SaveButton); this.Controls.Add(this.bottomPannel); this.Location = new System.Drawing.Point(0, 0); initEvent(); _setting = new ManualManagerSettings { ScriptTimeoutMilliSeconds = 0, V8DebugEnabled = true, V8DebugPort = 0, // 9229, LocalV8DebugEnabled = false }; manager = new RuntimeManager(_setting); JavaScript.Manager.Tabris.Tabris.Register(manager.RequireManager, new JavaScript.Manager.Tabris.TabrisOptions { LogExecutor = new WinformLogExcutor(logAction), ViewExecutor = new ChromeViewExecutor { AddChrome = AddChrome } }); //GetDebuggerTargetId(); //debuggerUrl =string.Format( // "chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:{0}/{1}", // _setting.V8DebugPort, TargetId); Debug.WriteLine("V8DebugPort:" + _setting.V8DebugPort); debuggerBrower.Load("http://127.0.0.1:" + debuggerPort + "/debug?port=" + _setting.V8DebugPort); debuggerBrower.FrameLoadEnd += DebuggerBrowserForOnFrameLoadEnd; }
/// <summary> /// Creates a new Runtime Manager. /// </summary> /// <param name="settings">Settings to apply to the Runtime Manager and the scripts it runs.</param> public RuntimeManager(IManagerSettings settings) { _settings = settings; _v8Runtime = new V8Runtime(new V8RuntimeConstraints { MaxExecutableSize = settings.MaxExecutableBytes, MaxOldSpaceSize = settings.MaxOldSpaceBytes, MaxNewSpaceSize = settings.MaxNewSpaceBytes }); _scriptCompiler = new ScriptCompiler(_v8Runtime, settings); }
public ScriptCompiler(V8Runtime v8Runtime, IManagerSettings settings) { _settings = settings; _v8Runtime = v8Runtime; _scriptCache = new LruCache <string, CachedV8Script>(LurchTableOrder.Access, settings.ScriptCacheMaxCount); }
/// <summary> /// Creates a new Runtime Manager. /// </summary> /// <param name="settings">Settings to apply to the Runtime Manager and the scripts it runs.</param> public RuntimeManager(IManagerSettings settings) { _settings = settings; _v8Runtime = new V8Runtime(new V8RuntimeConstraints { MaxExecutableSize = settings.MaxExecutableBytes, MaxOldSpaceSize = settings.MaxOldSpaceBytes, MaxNewSpaceSize = settings.MaxNewSpaceBytes }); _scriptCompiler = new ScriptCompiler(_v8Runtime, settings); }
public void ApplySettings(IManagerSettings CurrentSettings) { }
/// <summary> /// Initializes the CurrentPool with the provided settings. /// </summary> /// <param name="settings">Settings to apply.</param> public static void InitializeCurrentPool(IManagerSettings settings) { CurrentPool = new ManagerPool(settings); }
public ScriptCompiler(V8Runtime v8Runtime, IManagerSettings settings) { _settings = settings; _v8Runtime = v8Runtime; _scriptCache = new LruCache<string, CachedV8Script>(LurchTableOrder.Access, settings.ScriptCacheMaxCount); }
/// <summary> /// Initializes the CurrentPool with the provided settings. /// </summary> /// <param name="settings">Settings to apply.</param> public static void InitializeCurrentPool(IManagerSettings settings) { CurrentPool = new ManagerPool(settings); }