Table of Contents

Class CommandRunner<TResult>

Namespace
OneImlx.Terminal.Commands.Runners
Assembly
OneImlx.Terminal.dll

The command runner is where developers implement how commands are executed. It operates asynchronously to handle commands that might take a while to process. The framework routes each parsed command to its specific runner, helping to organize and manage the command execution logic within your application.

public abstract class CommandRunner<TResult> : IDelegateCommandRunner, ICommandRunner<TResult> where TResult : CommandRunnerResult

Type Parameters

TResult
Inheritance
CommandRunner<TResult>
Implements
Derived
Inherited Members

Methods

DelegateHelpAsync(CommandRunnerContext, ITerminalHelpProvider, ILogger?)

Delegates to RunHelpAsync(CommandRunnerContext) asynchronously.

public Task<CommandRunnerResult> DelegateHelpAsync(CommandRunnerContext context, ITerminalHelpProvider helpProvider, ILogger? logger = null)

Parameters

context CommandRunnerContext

The runner context.

helpProvider ITerminalHelpProvider

The help provider.

logger ILogger

The logger.

Returns

Task<CommandRunnerResult>

The runner result.

DelegateRunAsync(CommandRunnerContext, ILogger?)

Delegates to RunCommandAsync(CommandRunnerContext) asynchronously.

public Task<CommandRunnerResult> DelegateRunAsync(CommandRunnerContext context, ILogger? logger = null)

Parameters

context CommandRunnerContext

The runner context.

logger ILogger

The logger.

Returns

Task<CommandRunnerResult>

The runner result.

RunCommandAsync(CommandRunnerContext)

Runs a command asynchronously.

public abstract Task<TResult> RunCommandAsync(CommandRunnerContext context)

Parameters

context CommandRunnerContext

The runner context.

Returns

Task<TResult>

The runner result.

RunHelpAsync(CommandRunnerContext)

Runs the command help asynchronously.

public virtual Task RunHelpAsync(CommandRunnerContext context)

Parameters

context CommandRunnerContext

The command context.

Returns

Task

Exceptions

NotImplementedException