/// <summary> /// Reads the next character from the standard input stream within the specified timeout period. /// </summary> /// <param name="timeoutInMilliSeconds">A System.TimeSpan that represents the number of milliseconds to wait, or a System.TimeSpan that represents -1 milliseconds to wait indefinitely.</param> /// <param name="defaultValue">A default value will be returned from this call when the timeout period elapsed while reading from console.</param> /// <param name="errMsg">A error message used to throw ChoTimeoutException when timeout happens while reading line from console and default value is not specified.</param> /// <returns> /// A System.ConsoleKeyInfo object that describes the System.ConsoleKey constant and Unicode character, if any, that correspond to the pressed console key. /// The System.ConsoleKeyInfo object also describes, in a bitwise combination of System.ConsoleModifiers values, whether one or more SHIFT, ALT, or /// CTRL modifier keys was pressed simultaneously with the console key. /// </returns> public ConsoleKeyInfo ReadKey(int timeoutInMilliSeconds) { return(ChoConsole.ReadKey(timeoutInMilliSeconds)); }
/// <summary> /// Reads the next character from the standard input stream within the specified timeout period. /// </summary> /// <param name="timeoutInMilliSeconds">A System.TimeSpan that represents the number of milliseconds to wait, or a System.TimeSpan that represents -1 milliseconds to wait indefinitely.</param> /// <param name="defaultValue">A default value will be returned from this call when the timeout period elapsed while reading from console.</param> /// <param name="errMsg">A error message used to throw ChoTimeoutException when timeout happens while reading line from console and default value is not specified.</param> /// <returns> /// A System.ConsoleKeyInfo object that describes the System.ConsoleKey constant and Unicode character, if any, that correspond to the pressed console key. /// The System.ConsoleKeyInfo object also describes, in a bitwise combination of System.ConsoleModifiers values, whether one or more SHIFT, ALT, or /// CTRL modifier keys was pressed simultaneously with the console key. /// </returns> public ConsoleKeyInfo ReadKey(int timeoutInMilliSeconds, ConsoleKeyInfo?defaultValue, string errMsg) { return(ChoConsole.ReadKey(timeoutInMilliSeconds, defaultValue, errMsg)); }
/// <summary> /// Reads the next character from the standard input stream. /// </summary> /// <returns> /// A System.ConsoleKeyInfo object that describes the System.ConsoleKey constant and Unicode character, if any, that correspond to the pressed console key. /// The System.ConsoleKeyInfo object also describes, in a bitwise combination of System.ConsoleModifiers values, whether one or more SHIFT, ALT, or /// CTRL modifier keys was pressed simultaneously with the console key. /// </returns> public ConsoleKeyInfo ReadKey() { return(ChoConsole.ReadKey()); }