tgstation-server 5.12.7
The /tg/station 13 server suite
Loading...
Searching...
No Matches
IConsole.cs
Go to the documentation of this file.
1using System.Threading;
2using System.Threading.Tasks;
3
5{
9 interface IConsole
10 {
14 bool Available { get; }
15
19 CancellationToken CancelKeyPress { get; }
20
28 Task WriteAsync(string text, bool newLine, CancellationToken cancellationToken);
29
35 Task PressAnyKeyAsync(CancellationToken cancellationToken);
36
43 Task<string> ReadLineAsync(bool usePasswordChar, CancellationToken cancellationToken);
44 }
45}
Abstraction for global::System.Console.
Definition: IConsole.cs:10
CancellationToken CancelKeyPress
Gets a CancellationToken that triggers if Crtl+C or an equivalent is pressed.
Definition: IConsole.cs:19
bool Available
If the IConsole is visible to the user.
Definition: IConsole.cs:14
Task< string > ReadLineAsync(bool usePasswordChar, CancellationToken cancellationToken)
Read a line from the IConsole.
Task PressAnyKeyAsync(CancellationToken cancellationToken)
Wait for a key press on the IConsole.
Task WriteAsync(string text, bool newLine, CancellationToken cancellationToken)
Write some text to the IConsole.