IConsole Interface

Summary

Represents console output.
Namespace
Cake.Core
Implementing Types
graph BT Type["IConsole"] class Type type-node Implementing0["CakeConsole"]-.->Type click Implementing0 "/api/Cake.Core/CakeConsole" Implementing1["FakeConsole"]-.->Type click Implementing1 "/api/Cake.Testing/FakeConsole"

Syntax

public interface IConsole

Properties

Name Value Summary
BackgroundColor ConsoleColor
Gets or sets the background color.
ForegroundColor ConsoleColor
Gets or sets the foreground color.

Methods

Name Value Summary
ResetColor() void
Sets the foreground and background console colors to their defaults.
Write(string, object[]) void
Writes the text representation of the specified array of objects to the console output using the specified format information.
WriteError(string, object[]) void
Writes the text representation of the specified array of objects to the console error output using the specified format information.
WriteErrorLine(string, object[]) void
Writes the text representation of the specified array of objects, followed by the current line terminator, to the console error output using the specified format information.
WriteLine(string, object[]) void
Writes the text representation of the specified array of objects, followed by the current line terminator, to the console output using the specified format information.

Extension Methods

Name Value Summary
Dump<IConsole>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<IConsole>(IConsole[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<IConsole>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<IConsole>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<IConsole>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<IConsole>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
WriteErrorLine() void
Writes an empty line to the console error output.
WriteLine() void
Writes an empty line to the console output.