Class PhysicalConsole
An implementation of IConsole that wraps System.Console.
Inheritance
System.Object
    PhysicalConsole
  Implements
Inherited Members
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
  Namespace: McMaster.Extensions.CommandLineUtils
Assembly: McMaster.Extensions.CommandLineUtils.dll
Syntax
public class PhysicalConsole : IConsole
  Properties
| Improve this Doc View SourceBackgroundColor
System.Console.BackgroundColor.
Declaration
public ConsoleColor BackgroundColor { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.ConsoleColor | 
Error
System.Console.Error.
Declaration
public TextWriter Error { get; }
  Property Value
| Type | Description | 
|---|---|
| System.IO.TextWriter | 
ForegroundColor
System.Console.ForegroundColor.
Declaration
public ConsoleColor ForegroundColor { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.ConsoleColor | 
In
System.Console.In.
Declaration
public TextReader In { get; }
  Property Value
| Type | Description | 
|---|---|
| System.IO.TextReader | 
IsErrorRedirected
System.Console.IsErrorRedirected.
Declaration
public bool IsErrorRedirected { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
IsInputRedirected
System.Console.IsInputRedirected.
Declaration
public bool IsInputRedirected { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
IsOutputRedirected
System.Console.IsOutputRedirected.
Declaration
public bool IsOutputRedirected { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Out
System.Console.Out.
Declaration
public TextWriter Out { get; }
  Property Value
| Type | Description | 
|---|---|
| System.IO.TextWriter | 
Singleton
A shared instance of PhysicalConsole.
Declaration
public static IConsole Singleton { get; }
  Property Value
| Type | Description | 
|---|---|
| IConsole | 
Methods
| Improve this Doc View SourceResetColor()
System.Console.ResetColor.
Declaration
public void ResetColor()
  Events
| Improve this Doc View SourceCancelKeyPress
System.Console.CancelKeyPress.
Declaration
public event ConsoleCancelEventHandler? CancelKeyPress
  Event Type
| Type | Description | 
|---|---|
| System.Nullable<System.ConsoleCancelEventHandler> |