public void RunCommand(string command, DoneHandler done = null) { //AddText(command + "\r\n"); this.runner.Run(command, () => { done?.Invoke(); }); }
private static IEnumerator WaitWhileTrueCoroutine(Func <bool> condition, DoneHandler callback, float timeoutSeconds, bool reverseCondition = false) { while ((timeoutSeconds > 0) && (condition.Invoke() == !reverseCondition)) { timeoutSeconds -= Time.deltaTime; yield return(null); } callback.Invoke(timeoutSeconds > 0); }
/// <summary> /// Waits while condition is true /// If timed out, callback will be invoked with false /// </summary> public static void WaitWhile(Func <bool> condiction, DoneHandler doneCallback, float timeoutSeconds) { CoroutineHelper.StartCoroutine(WaitWhileTrueCoroutine(condiction, doneCallback, timeoutSeconds)); }
public DoneHandlerTests() { _subject = new DoneHandler(_taskRepository.Object); }
public static void WaitUntil(Func <bool> condiction, DoneHandler doneCallback, float timeoutSeconds) { _instance.StartCoroutine(WaitWhileTrueCoroutine(condiction, doneCallback, timeoutSeconds, true)); }
public static void Destroy () { if (_md != null) { _md.Response -= new ResponseHandler(RespHandler); _md.Destroy (); _md = null; _doneHandler = null; } }
public static void ShowModeless(string msg, DoneHandler dh) { _doneHandler = dh; _md = new MessageDialog (null, DialogFlags.DestroyWithParent, MessageType.Other, ButtonsType.Ok, msg); _md.Response += new ResponseHandler(RespHandler); _md.ShowNow(); //_md.Run(); }
public void RunInProject(string command, DoneHandler done = null) { this.RunCommand("\"cd /d " + package.ProjectPath + " && " + command + "\"", done); }
public void RunTruffleCommand(string command, DoneHandler done = null) { this.RunCommand("\"cd /d " + package.ProjectPath + " && .\\node_modules\\.bin\\truffle.cmd " + command + " --no-colors", done); }