Table of Contents

Class TerminalNoConsole

Namespace
OneImlx.Terminal.Runtime
Assembly
OneImlx.Terminal.dll

A no-operation console implementation for the ITerminalConsole interface. This implementation does not perform any actual console input/output operations.

public class TerminalNoConsole : ITerminalConsole
Inheritance
TerminalNoConsole
Implements
Inherited Members

Properties

BackgroundColor

The background color of the ITerminalConsole.

public ConsoleColor BackgroundColor { get; set; }

Property Value

ConsoleColor

ForegroundColor

The foreground color of the ITerminalConsole.

public ConsoleColor ForegroundColor { get; set; }

Property Value

ConsoleColor

In

Gets the standard console input stream.

public TextReader In { get; }

Property Value

TextReader

Out

Gets the standard console output stream.

public TextWriter Out { get; }

Property Value

TextWriter

Methods

ClearAsync()

Clears the ITerminalConsole buffer and the corresponding display information.

public Task ClearAsync()

Returns

Task

Ignore(string?)

Return true if the specified string value is ignored by the ITerminalConsole, otherwise false.

public bool Ignore(string? value)

Parameters

value string

The value to check.

Returns

bool

ReadAnswerAsync(string, params string[]?)

Prints the question to the ITerminalConsole standard output stream and waits for an answer asynchronously.

public Task<string> ReadAnswerAsync(string question, params string[]? answers)

Parameters

question string

The question to print.

answers string[]

The optional allowed answers.

Returns

Task<string>

The answer to the question.

ReadLineAsync()

Reads the next line of characters from the ITerminalConsole input stream asynchronously.

public Task<string?> ReadLineAsync()

Returns

Task<string>

The next line of characters from the input stream, or null if no more lines are available.

WriteAsync(string, params object[])

Writes the specified string value to the ITerminalConsole standard output stream.

public Task WriteAsync(string value, params object[] args)

Parameters

value string

The text to write.

args object[]

The format arguments.

Returns

Task

WriteColorAsync(ConsoleColor, string, params object[])

Writes the specified string value in the foreground color to the ITerminalConsole standard output stream.

public Task WriteColorAsync(ConsoleColor foregroundColor, string value, params object[] args)

Parameters

foregroundColor ConsoleColor

The foreground text color.

value string

The text to write.

args object[]

The format arguments.

Returns

Task

WriteLineAsync()

Writes the current newline terminator to the ITerminalConsole input stream asynchronously.

public Task WriteLineAsync()

Returns

Task

WriteLineAsync(string, params object[])

Writes the specified string value followed by the current newline terminator to the ITerminalConsole standard output stream.

public Task WriteLineAsync(string value, params object[] args)

Parameters

value string

The text to write.

args object[]

The format arguments.

Returns

Task

WriteLineColorAsync(ConsoleColor, string, params object[])

Writes the specified string value in the foreground color followed by the current newline terminator to the ITerminalConsole standard output stream.

public Task WriteLineColorAsync(ConsoleColor foregroundColor, string value, params object[] args)

Parameters

foregroundColor ConsoleColor

The foreground text color.

value string

The text to write.

args object[]

The format arguments.

Returns

Task