Show / Hide Table of Contents

Class CommandBase

Inheritance
object
CommandBase
CommandBase<TArgs>
Implements
ICommand
Inherited Members
object.GetType()
object.MemberwiseClone()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: PayrollEngine.Client.Command
Assembly: PayrollEngine.Client.Core.dll
Syntax
public abstract class CommandBase : ICommand

Constructors

CommandBase()

Declaration
protected CommandBase()

Properties

BackendCommand

Backend command.

Declaration
public virtual bool BackendCommand { get; }
Property Value
Type Description
bool

Name

Command name.

Declaration
public virtual string Name { get; }
Property Value
Type Description
string

Methods

DisplayResponseContent(ICommandConsole, HttpResponseMessage)

Display respondent content.

Declaration
protected static Task DisplayResponseContent(ICommandConsole console, HttpResponseMessage response)
Parameters
Type Name Description
ICommandConsole console
HttpResponseMessage response
Returns
Type Description
Task

DisplayTitle(ICommandConsole, string)

Display program title.

Declaration
protected void DisplayTitle(ICommandConsole console, string title)
Parameters
Type Name Description
ICommandConsole console

Command console.

string title

Application title.

ExecuteAsync(CommandContext, ICommandParameters)

Execute command.

Declaration
public Task<int> ExecuteAsync(CommandContext context, ICommandParameters parameters)
Parameters
Type Name Description
CommandContext context

Command context.

ICommandParameters parameters

Command parameters.

Returns
Type Description
Task<int>

Error code, zero on valid command execution.

GetParameters(CommandLineParser)

Get command parameters.

Declaration
public abstract ICommandParameters GetParameters(CommandLineParser parser)
Parameters
Type Name Description
CommandLineParser parser

Command line parser.

Returns
Type Description
ICommandParameters

OnExecute(CommandContext, ICommandParameters)

Execute command.

Declaration
protected abstract Task<int> OnExecute(CommandContext context, ICommandParameters parameters)
Parameters
Type Name Description
CommandContext context

Command context.

ICommandParameters parameters

Command parameters.

Returns
Type Description
Task<int>

Error code, zero on valid command execution.

ProcessError(ICommandConsole, Exception)

Process command error.

Declaration
protected void ProcessError(ICommandConsole console, Exception exception)
Parameters
Type Name Description
ICommandConsole console

Command console.

Exception exception

Command error.

ShowHelp(ICommandConsole)

Show command help.

Declaration
public abstract void ShowHelp(ICommandConsole console)
Parameters
Type Name Description
ICommandConsole console

Display console.

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Implements

ICommand

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