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