System.ConsolePal.ControlCHandlerRegistrar.BreakEvent C# (CSharp) Method

BreakEvent() private static method

private static BreakEvent ( int controlType ) : bool
controlType int
return bool
            private static bool BreakEvent(int controlType)
            {
                if (controlType != Interop.Kernel32.CTRL_C_EVENT &&
                    controlType != Interop.Kernel32.CTRL_BREAK_EVENT)
                {
                    return false;
                }

                return Console.HandleBreakEvent(controlType == Interop.Kernel32.CTRL_C_EVENT ? ConsoleSpecialKey.ControlC : ConsoleSpecialKey.ControlBreak);
            }
        }