private static void OnCancelKey(ConsoleCancelEventArgs ev, RubyContext context, Thread mainThread) { if (ev.SpecialKey == ConsoleSpecialKey.ControlC) { ev.Cancel = true; Action handler = context.InterruptSignalHandler; if (handler != null) { try { handler(); } catch (Exception e) { RubyUtils.RaiseAsyncException(mainThread, e); } } } }
private static void OnCancelKeyPress(object sender, ConsoleCancelEventArgs e) { Exit(); }
private static void OnExit(object sender, ConsoleCancelEventArgs args) { Closing.Set(); }
protected void AbortHandler(object sender, ConsoleCancelEventArgs args) { DisplayStats(); }
static void interrupt_handler(object sender, ConsoleCancelEventArgs e) { quit = true; e.Cancel = true; }
private static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { _socketListener.Shutdown(SocketShutdown.Both); _socketListener.Close(1000); }
static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { Console.WriteLine("Exiting..."); Environment.Exit(0); }
static void AbortHandler(object sender, ConsoleCancelEventArgs args) { DisplayStats(); }
private static void CancelKeyPress(object sender, ConsoleCancelEventArgs e) { e.Cancel = true; }
protected static void myHandler(object sender, ConsoleCancelEventArgs args) { server.Shutdown(); args.Cancel = true; }
private static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { logger.Warn("Terminating..."); e.Cancel = true; token.Cancel(); }
public static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { Console.WriteLine("Now CTRL+C is used as the cancel key"); Console.ReadLine(); e.Cancel = true; }
private void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { RunShutdownTasks(); }
private void OnConsoleCancelKeyPress(object sender, ConsoleCancelEventArgs e) => Stop();
private void OnExit(object sender, ConsoleCancelEventArgs args) { CancelEventSourceListeners(); }
static void AbortHandler(object sender, ConsoleCancelEventArgs args) { DisplayIterationStats(); Console.Error.WriteLine("memory {0}", Memory.Usage); }
void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { if (e.SpecialKey == ConsoleSpecialKey.ControlC) { e.Cancel = true; ctrlCEvent.Set(); MainEngineThread.Abort(new PythonKeyboardInterruptException("")); } }
private void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { _agentWriter.FlushAndCloseAsync().Wait(); }
protected static void exit_handler(object sender, ConsoleCancelEventArgs args) { args.Cancel = true; }
private static void CancelKeyPressed(object sender, ConsoleCancelEventArgs e) { e.Cancel = true; continueRunning = false; }
protected static void CloseConsole(object sender, ConsoleCancelEventArgs e) { Environment.Exit(0); }
private void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { Debug.Log("Exit"); }
private static void ConsoleOnCancelKeyPress(object sender, ConsoleCancelEventArgs e) { cancellationTokenSource.Cancel(); }
private static void ConsoleOnCancelKeyPress(object sender, ConsoleCancelEventArgs e) { Log.Warning("Canceling process"); e.Cancel = true; ExitEvent.Set(); }
private static void CancelKeyHandler(object sender, ConsoleCancelEventArgs args) { // Handle process exiting ourself. args.Cancel = true; IoCManager.Resolve <IBaseServer>().Shutdown(); }
// Add a reference to this class in the event handler arguments private static void CancelHandlerEx(object s, ConsoleCancelEventArgs e) { CancelHandler(e); }
static void consoleCancelHandle(object sender, ConsoleCancelEventArgs e) { Console.WriteLine("Aguarde o término das requisições."); cancel = true; }
private void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { _shouldClose = true; }
// Notice the special work for handling Ctrl+C pressed (i.e copy selection to clipboard) void On_Ctrl_C_Pressed(object sender, ConsoleCancelEventArgs args) { KeyHandlerCtrl.HandleCtrlCPressed(m_CurrentState); }
private void ConsoleCancelKeyPress(object sender, ConsoleCancelEventArgs e) { _tokenSource.Cancel(); }
/// <summary> /// Executed if user interrups the program (i.e. CTRL+C) /// </summary> static void CancelKeyPressHandler(object sender, ConsoleCancelEventArgs args) { log.Info("Application interrupted by user"); CleanUp(); Environment.Exit(0); }
private static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { e.Cancel = true; _tokenSource.Cancel(); }
static void Shutdown(object sender, ConsoleCancelEventArgs e) { Console.WriteLine("Closing HttpListener"); listener.Close(); Environment.Exit(0); }
static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { }
public static void CancelHandler(object sender, ConsoleCancelEventArgs args) { UpdateManager.Instance.Abort(true); Environment.Exit(2); }
public static void Stop(object sender, ConsoleCancelEventArgs e) { Console.WriteLine("Cancelling......"); heartbeatTimer.Stop(); heartbeatTimer.Dispose(); }
protected virtual void ConsoleInterrupt(object sender, ConsoleCancelEventArgs a) { // Do not about our program a.Cancel = true; evaluator.Interrupt (); }
private void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { Exit = true; }
static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { var end = DateTime.Now; Console.WriteLine("This program ran for {0:000.000} seconds.", (end - start).TotalMilliseconds / 1000); Environment.Exit(0); }
static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { // We don't actually want to do anything here. This will only get called on the off chance // that someone CTRL+C's the test run while the handler is hooked up. This is just used to // validate that we can add and remove a handler, we don't care about exercising it. }