Show / Hide Table of Contents

Class ConsoleToolBase

Tool with console operations

Inheritance
object
ConsoleToolBase
ConsoleProgram<TApp>
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: PayrollEngine.Client
Assembly: PayrollEngine.Client.Core.dll
Syntax
public abstract class ConsoleToolBase

Constructors

ConsoleToolBase()

Declaration
protected ConsoleToolBase()

Properties

ErrorColor

The console error foreground color

Declaration
public static ConsoleColor ErrorColor { get; set; }
Property Value
Type Description
ConsoleColor

ExitCode

Gets or sets the exit code of the process

Declaration
public static int ExitCode { get; set; }
Property Value
Type Description
int

ForegroundColor

Gets or sets the foreground color of the console

Declaration
public static ConsoleColor ForegroundColor { get; set; }
Property Value
Type Description
ConsoleColor

InfoColor

The console info foreground color

Declaration
public static ConsoleColor InfoColor { get; set; }
Property Value
Type Description
ConsoleColor

SuccessColor

The console success foreground color

Declaration
public static ConsoleColor SuccessColor { get; set; }
Property Value
Type Description
ConsoleColor

TitleColor

The console title foreground color

Declaration
public static ConsoleColor TitleColor { get; set; }
Property Value
Type Description
ConsoleColor

Methods

PressAnyKey()

Wait for key input

Declaration
public static void PressAnyKey()

Read()

Obtains the next character or function key pressed by the user

Declaration
public static int Read()
Returns
Type Description
int

Write(string)

Writes the text representation of the specified value or values to the standard output stream

Declaration
public static void Write(string text)
Parameters
Type Name Description
string text

WriteColor(string, ConsoleColor)

Write colored line

Declaration
public static void WriteColor(string text, ConsoleColor color)
Parameters
Type Name Description
string text
ConsoleColor color

WriteColorLine(string, ConsoleColor)

Write colored line

Declaration
public static void WriteColorLine(string text, ConsoleColor color)
Parameters
Type Name Description
string text
ConsoleColor color

WriteError(string)

Write error

Declaration
public static void WriteError(string text)
Parameters
Type Name Description
string text

WriteErrorLine(string)

Write error line

Declaration
public static void WriteErrorLine(string text)
Parameters
Type Name Description
string text

WriteInfo(string)

Write info

Declaration
public static void WriteInfo(string text)
Parameters
Type Name Description
string text

WriteInfoLine(string)

Write info line

Declaration
public static void WriteInfoLine(string text)
Parameters
Type Name Description
string text

WriteLine(string)

Writes the specified data, followed by the current line terminator, to the standard output stream

Declaration
public static void WriteLine(string text = null)
Parameters
Type Name Description
string text

WriteSuccess(string)

Write success

Declaration
public static void WriteSuccess(string text)
Parameters
Type Name Description
string text

WriteSuccessLine(string)

Write success line

Declaration
public static void WriteSuccessLine(string text)
Parameters
Type Name Description
string text

WriteTitle(string)

Write title

Declaration
public static void WriteTitle(string text)
Parameters
Type Name Description
string text

WriteTitleLine(string)

Write title line

Declaration
public static void WriteTitleLine(string text)
Parameters
Type Name Description
string text

Extension Methods

ConsoleExtensions.WriteProperties(object, bool)
ValueTypeExtensions.GetValueType(object)
ObjectInfo.GetPropertyValue(object, string)
ObjectInfo.GetPropertyValue<T>(object, string, T)
ObjectInfo.ResolvePropertyValue(object, string)
ObjectInfo.SetPropertyValue(object, string, object)
☀
☾
Back to top Generated by DocFX