public void SetInputHandle(ConsoleInputHandle inputHandle) { if (!NativeMethods.SetStdHandle(NativeMethods.STDIN, inputHandle.DangerousGetHandle())) { throw Exceptions.Win32(); } }
public ConsoleInputModes GetConsoleMode(ConsoleInputHandle consoleInputHandle) => NativeMethods.GetConsoleMode(consoleInputHandle.DangerousGetHandle(), out ConsoleInputModes mode) ? mode : throw Exceptions.Win32();