示例#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();