Skip to main content

CommandResult<T>

A class in Root.Township, Alta.Console.

A console command result carrying a typed value. Logs the value as text, a table or JSON depending on the type and the command's settings.

Constructors​

MemberWhat it is
protected CommandResult(Command command)Creates a CommandResult from resultString and command.
protected CommandResult(string resultString, Command command)Creates a CommandResult from resultString and command.

Properties​

MemberWhat it is
T Result { get; set; }The value the command returned.
override string ResultString { get; }The result's ToString().

Methods​

MemberWhat it is
override void Log()Traces the result: strings as is, lists or objects as a table if the command asks for that, otherwise as JSON (also copied to the clipboard).
void LogObjectsValuesAsTable()Traces the result's public properties as a name and value table.