/// <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>The next line of characters from the input stream, or null if no more lines</returns> public int Read(int timeoutInMilliSeconds, int?defaultValue, string errMsg) { return(ChoConsole.Read(timeoutInMilliSeconds, defaultValue, errMsg)); }
/// <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>The next line of characters from the input stream, or null if no more lines</returns> public int Read(int timeoutInMilliSeconds) { return(ChoConsole.Read(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> /// <returns>The next line of characters from the input stream, or null if no more lines</returns> public int Read(int timeoutInMilliSeconds, int?defaultValue) { return(ChoConsole.Read(timeoutInMilliSeconds, defaultValue)); }
/// <summary> /// Reads the next character from the standard input stream. /// </summary> public int Read() { return(ChoConsole.Read()); }