Table of Contents

Class PhysicalConsole

Namespace
McMaster.Extensions.CommandLineUtils
Assembly
McMaster.Extensions.CommandLineUtils.dll

An implementation of IConsole that wraps Console.

public class PhysicalConsole : IConsole
Inheritance
object
PhysicalConsole
Implements
Extension Methods

Properties

BackgroundColor

public ConsoleColor BackgroundColor { get; set; }

Property Value

ConsoleColor

Error

public TextWriter Error { get; }

Property Value

TextWriter

ForegroundColor

public ConsoleColor ForegroundColor { get; set; }

Property Value

ConsoleColor

In

In.

public TextReader In { get; }

Property Value

TextReader

IsErrorRedirected

public bool IsErrorRedirected { get; }

Property Value

bool

IsInputRedirected

public bool IsInputRedirected { get; }

Property Value

bool

IsOutputRedirected

public bool IsOutputRedirected { get; }

Property Value

bool

Out

Out.

public TextWriter Out { get; }

Property Value

TextWriter

Singleton

A shared instance of PhysicalConsole.

public static IConsole Singleton { get; }

Property Value

IConsole

Methods

ResetColor()

public void ResetColor()

Events

CancelKeyPress

public event ConsoleCancelEventHandler? CancelKeyPress

Event Type

ConsoleCancelEventHandler