Class CommandLineWrapper
Wraps the system console, invokes the piactl executable and captures the output.
public class CommandLineWrapper : ICommandLineWrapper
- Inheritance
-
CommandLineWrapper
- Implements
- Inherited Members
Methods
Execute(string, PiaCtlOptions, CancellationToken)
Invokes piactl with the specified command. Conforms to ExecuteDelegate
public Task<PiaResults> Execute(string command, PiaCtlOptions options, CancellationToken ct = default)
Parameters
commandstringThe CLI command to be passed to piactl
optionsPiaCtlOptionsThe options to configure PiaCtl.
ctCancellationTokenA cancellation token.
Returns
- Task<PiaResults>
A
Task<PiaResults>containing standard output and standard error results.
ExecuteTimed(uint, string, PiaCtlOptions)
Invokes piactl with the specified command and keeps the it running for a given time. Unless the command errors, this method will return success when the timeout expires. Conforms to ExecuteTimedDelegate
public Task<PiaResults> ExecuteTimed(uint timeout, string command, PiaCtlOptions options)
Parameters
timeoutuintThe time, in seconds, after which to cancel the task
commandstringThe CLI command to be passed to piactl
optionsPiaCtlOptionsThe options to configure PiaCtl.
Returns
- Task<PiaResults>
A
Task<PiaResults>containing standard output and standard error results.