public CommandRunner(ServiceManager svc, ExtensionClientManager extmgr) { _svc = svc; _extmgr = extmgr; Add(ExecCommand.Get()); Add(RestartCommand.Get()); }
public ScriptRunner(ServiceManager svc, ExtensionClientManager clientManager) { _svc = svc; _clientManager = clientManager; _engine.DisableSecurity(); _engine.SetFunction("__svc_jsonCall", new Func<string, string, string>(ServiceManagerJsonCall)); _engine.SetFunction("__ext_jsonCall", new Func<string, string, string, string>(ExtensionJsonCall)); _preScript = string.Concat( Resources.json2, Resources.scriptrunner, JavaScriptInterface.GenerateJavaScriptWrapper(svc), clientManager.GetJavaScriptWrappers() ); try { _engine.Run(_preScript); } catch(Exception ex) { LastException = ex; } }
public CronManager(ServiceManager svc) { _svc = svc; Init(); }