CakeConsole Class

Summary

The default console implementation.
Namespace
Cake.Core
Interfaces
Base Types
  • object
graph BT Type-->Base0["object"] Type-.->Interface0["IConsole"] click Interface0 "/api/Cake.Core/IConsole" Type["CakeConsole"] class Type type-node

Syntax

public sealed class CakeConsole : IConsole

Constructors

Name Summary
CakeConsole(ICakeEnvironment) Initializes a new instance of the CakeConsole class.

Properties

Name Value Summary
BackgroundColor ConsoleColor
Gets or sets the background color.
ForegroundColor ConsoleColor
Gets or sets the foreground color.
SupportAnsiEscapeCodes bool
Gets a value indicating whether or not the console supports ANSI escape codes.

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<CakeConsole>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<CakeConsole>(CakeConsole[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<CakeConsole>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<CakeConsole>(string) void
Requires the Cake.Issues addin
ThrowIfNull<CakeConsole>(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
ThrowIfNull<CakeConsole>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Requires the Cake.Issues addin
WriteErrorLine() void
Writes an empty line to the console error output.
WriteLine() void
Writes an empty line to the console output.