public static void Continue(this V8DebuggerProtocolClient debugger, string stepAction = null, int stepCount = 0) { var arg = new ContinueRequestArguments ().CreateLocalCache<ContinueRequestArguments> (); arg.Stepaction = stepAction; arg.Stepcount = stepCount; debugger.Continue (arg); }
public static ReceiveLoop EnableSuspendResume(this ReceiveLoop loop, Inbox inbox) { return loop.Receive<Suspend>(pause => { // we are going to only receive a continue until we get it inbox.Receive<Resume>(x => { // repeat the loop now loop.Continue(); }); }); }
public static Task Continue(this IEnumerator enumerator, Func<IEnumerator> routiner) { return enumerator.Continue (routiner ()); }
public static bool TryStart(this ServiceController serviceController, TimeSpan timeoutPeriod, out string failureReason) { var stopwatch = new Stopwatch(); failureReason = string.Empty; try { serviceController.Refresh(); switch (serviceController.Status) { case ServiceControllerStatus.ContinuePending: return true; case ServiceControllerStatus.Paused: case ServiceControllerStatus.PausePending: stopwatch.Start(); serviceController.Continue(); serviceController.WaitForStatus(ServiceControllerStatus.Running, timeoutPeriod); stopwatch.Stop(); if (serviceController.Status != ServiceControllerStatus.Running) { failureReason = CommonResources.Error_ServiceStartTimedOut; return false; } break; case ServiceControllerStatus.Running: return true; case ServiceControllerStatus.StartPending: stopwatch.Start(); serviceController.WaitForStatus(ServiceControllerStatus.Running, timeoutPeriod); stopwatch.Stop(); if (serviceController.Status != ServiceControllerStatus.Running) { failureReason = CommonResources.Error_ServiceStartTimedOut; return false; } break; case ServiceControllerStatus.Stopped: case ServiceControllerStatus.StopPending: stopwatch.Start(); serviceController.Start(); serviceController.WaitForStatus(ServiceControllerStatus.Running, timeoutPeriod); stopwatch.Stop(); if (serviceController.Status != ServiceControllerStatus.Running) { failureReason = CommonResources.Error_ServiceStartTimedOut; return false; } break; default: throw new ArgumentOutOfRangeException(); } } catch (Exception e) { failureReason = e.Message; } return true; }