Interface IConsole
An abstract console.
Namespace: McMaster.Extensions.CommandLineUtils
Assembly: McMaster.Extensions.CommandLineUtils.dll
Syntax
public interface IConsole
  Properties
| Improve this Doc View SourceBackgroundColor
The background color of output.
Declaration
ConsoleColor BackgroundColor { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.ConsoleColor | 
Error
stderr
Declaration
TextWriter Error { get; }
  Property Value
| Type | Description | 
|---|---|
| System.IO.TextWriter | 
ForegroundColor
The foreground color of output.
Declaration
ConsoleColor ForegroundColor { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.ConsoleColor | 
In
stdin
Declaration
TextReader In { get; }
  Property Value
| Type | Description | 
|---|---|
| System.IO.TextReader | 
IsErrorRedirected
Is stderr being piped to somewhere?
Declaration
bool IsErrorRedirected { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
IsInputRedirected
Is stdin piped from somewhere?
Declaration
bool IsInputRedirected { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
IsOutputRedirected
Is stdout being piped to somewhere?
Declaration
bool IsOutputRedirected { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Out
stdout
Declaration
TextWriter Out { get; }
  Property Value
| Type | Description | 
|---|---|
| System.IO.TextWriter | 
Methods
| Improve this Doc View SourceResetColor()
Resets ForegroundColor and BackgroundColor.
Declaration
void ResetColor()
  Events
| Improve this Doc View SourceCancelKeyPress
Raised when Ctrl+C is pressed.
Declaration
event ConsoleCancelEventHandler? CancelKeyPress
  Event Type
| Type | Description | 
|---|---|
| System.Nullable<System.ConsoleCancelEventHandler> |