Interface IConsole
- Namespace
- McMaster.Extensions.CommandLineUtils
- Assembly
- McMaster.Extensions.CommandLineUtils.dll
An abstract console.
public interface IConsole
- Extension Methods
Properties
BackgroundColor
The background color of output.
ConsoleColor BackgroundColor { get; set; }
Property Value
Error
stderr
TextWriter Error { get; }
Property Value
ForegroundColor
The foreground color of output.
ConsoleColor ForegroundColor { get; set; }
Property Value
In
stdin
TextReader In { get; }
Property Value
IsErrorRedirected
Is stderr being piped to somewhere?
bool IsErrorRedirected { get; }
Property Value
IsInputRedirected
Is stdin piped from somewhere?
bool IsInputRedirected { get; }
Property Value
IsOutputRedirected
Is stdout being piped to somewhere?
bool IsOutputRedirected { get; }
Property Value
Out
stdout
TextWriter Out { get; }
Property Value
Methods
ResetColor()
Resets ForegroundColor and BackgroundColor.
void ResetColor()
Events
CancelKeyPress
Raised when Ctrl+C is pressed.
event ConsoleCancelEventHandler? CancelKeyPress