Table of Contents

Interface ICommandExecutor

Namespace
Steeltoe.Common.Utils.Diagnostics
Assembly
Steeltoe.Common.Utils.dll

A utility abstraction to simplify the running of commands.

[Obsolete("This feature will be removed in the next major version. See https://steeltoe.io/docs/v3/obsolete for details.")]
public interface ICommandExecutor

Methods

ExecuteAsync(string, string, int)

Execute the command and return the result.

Task<CommandResult> ExecuteAsync(string command, string workingDirectory = null, int timeout = -1)

Parameters

command string

Command to be executed.

workingDirectory string

The directory that contains the command process.

timeout int

The amount of time in milliseconds to wait for command to complete.

Returns

Task<CommandResult>

Command result.

Exceptions

CommandException

If a process can not be started for command.