Table of Contents

Class NullConsole

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

An implementation of IConsole that does nothing.

public class NullConsole : IConsole
Inheritance
object
NullConsole
Implements
Extension Methods

Properties

BackgroundColor

The background color of output.

public ConsoleColor BackgroundColor { get; set; }

Property Value

ConsoleColor

Error

A writer that does nothing.

public TextWriter Error { get; }

Property Value

TextWriter

ForegroundColor

The foreground color of output.

public ConsoleColor ForegroundColor { get; set; }

Property Value

ConsoleColor

In

An empty reader.

public TextReader In { get; }

Property Value

TextReader

IsErrorRedirected

Always false.

public bool IsErrorRedirected { get; }

Property Value

bool

IsInputRedirected

Always false.

public bool IsInputRedirected { get; }

Property Value

bool

IsOutputRedirected

Always false.

public bool IsOutputRedirected { get; }

Property Value

bool

Out

A writer that does nothing.

public TextWriter Out { get; }

Property Value

TextWriter

Singleton

A shared instance of NullConsole.

public static NullConsole Singleton { get; }

Property Value

NullConsole

Methods

ResetColor()

Does nothing.

public void ResetColor()

Events

CancelKeyPress

This event never fires.

public event ConsoleCancelEventHandler? CancelKeyPress

Event Type

ConsoleCancelEventHandler