private static async Task <ConsoleKeyInfo> ReadKeyAsync(CancellationToken cancellationToken)
 {
     return(await s_consoleProxy.ReadKeyAsync(cancellationToken));
 }
Example #2
0
 /// <summary>
 /// Obtains the next character or function key pressed by the user asynchronously.
 /// Does not block when other console API's are called.
 /// </summary>
 /// <param name="intercept">
 /// Determines whether to display the pressed key in the console window. <see langword="true" />
 /// to not display the pressed key; otherwise, <see langword="false" />.
 /// </param>
 /// <param name="cancellationToken">The CancellationToken to observe.</param>
 /// <returns>
 /// A task that will complete with a result of the key pressed by the user.
 /// </returns>
 public static Task <ConsoleKeyInfo> ReadKeyAsync(bool intercept, CancellationToken cancellationToken) =>
 s_consoleProxy.ReadKeyAsync(intercept, cancellationToken);
Example #3
0
 public static Task <ConsoleKeyInfo> ReadKeyAsync(CancellationToken cancellationToken) =>
 s_consoleProxy.ReadKeyAsync(cancellationToken);