CliWrap
Buffered execution model.
Executes the command asynchronously with buffering.
Data written to the standard output and standard error streams is decoded as text
and returned as part of the result object.
This method can be awaited.
Executes the command asynchronously with buffering.
Data written to the standard output and standard error streams is decoded as text
and returned as part of the result object.
This method can be awaited.
Executes the command asynchronously with buffering.
Data written to the standard output and standard error streams is decoded as text
and returned as part of the result object.
This method can be awaited.
Executes the command asynchronously with buffering.
Data written to the standard output and standard error streams is decoded as text
and returned as part of the result object.
Uses for decoding.
This method can be awaited.
Result of a command execution, with buffered text data from standard output and standard error streams.
Result of a command execution, with buffered text data from standard output and standard error streams.
Standard output data produced by the underlying process.
Standard error data produced by the underlying process.
Builder that helps format command-line arguments into a string.
Adds the specified value to the list of arguments.
Adds the specified value to the list of arguments.
Adds the specified values to the list of arguments.
Adds the specified values to the list of arguments.
Adds the specified value to the list of arguments.
Adds the specified value to the list of arguments.
Adds the specified value to the list of arguments.
Adds the specified value to the list of arguments.
The value is converted to string using invariant culture.
Adds the specified value to the list of arguments.
The value is converted to string using invariant culture.
Adds the specified values to the list of arguments.
Adds the specified values to the list of arguments.
Adds the specified values to the list of arguments.
Adds the specified values to the list of arguments.
The values are converted to string using invariant culture.
Adds the specified values to the list of arguments.
The values are converted to string using invariant culture.
Builds the resulting arguments string.
Escapes special characters (spaces, slashes, and quotes) in the specified string, ensuring that the output
is correctly interpreted as a single argument when passed to a command-line application.
In most cases, you should not need to use this method, as already escapes
arguments automatically. This method is provided for advanced scenarios where you need to escape arguments
manually.
Builder that helps configure user credentials.
Sets the Active Directory domain used when starting the process.
For information on platform support, see attributes on .
Sets the username used when starting the process.
For information on platform support, see attributes on .
Sets the password used when starting the process.
For information on platform support, see attributes on .
Instructs whether to load the user profile when starting the process.
For information on platform support, see attributes on .
Builds the resulting credentials.
Builder that helps configure environment variables.
Sets an environment variable with the specified name to the specified value.
Sets multiple environment variables from the specified sequence of key-value pairs.
Sets multiple environment variables from the specified dictionary.
Builds the resulting environment variables.
Builder that helps configure resource policy.
Sets the priority class of the process.
For information on platform support, see attributes on .
Sets the processor core affinity mask of the process.
For example, to set the affinity to cores 1 and 3 out of 4, pass 0b1010.
For information on platform support, see attributes on .
Sets the minimum working set size of the process.
For information on platform support, see attributes on .
Sets the maximum working set size of the process.
For information on platform support, see attributes on .
Builds the resulting resource policy.
Main entry point for creating new commands.
Creates a new command that targets the specified command-line executable, batch file, or script.
Instructions for running a process.
Instructions for running a process.
Initializes an instance of .
Creates a copy of this command, setting the target file path to the specified value.
Creates a copy of this command, setting the arguments to the specified value.
Avoid using this overload, as it requires the arguments to be escaped manually.
Formatting errors may lead to unexpected bugs and security vulnerabilities.
Creates a copy of this command, setting the arguments to the value
obtained by formatting the specified enumeration.
Creates a copy of this command, setting the arguments to the value
obtained by formatting the specified enumeration.
Creates a copy of this command, setting the arguments to the value
configured by the specified delegate.
Creates a copy of this command, setting the working directory path to the specified value.
Creates a copy of this command, setting the resource policy to the specified value.
Creates a copy of this command, setting the resource policy to the value
configured by the specified delegate.
Creates a copy of this command, setting the user credentials to the specified value.
Creates a copy of this command, setting the user credentials to the value
configured by the specified delegate.
Creates a copy of this command, setting the environment variables to the specified value.
Creates a copy of this command, setting the environment variables to the value
configured by the specified delegate.
Creates a copy of this command, setting the validation options to the specified value.
Creates a copy of this command, setting the standard input pipe to the specified source.
Creates a copy of this command, setting the standard output pipe to the specified target.
Creates a copy of this command, setting the standard error pipe to the specified target.
Executes the command asynchronously.
This overload allows you to directly configure the underlying process, and should
only be used in rare cases when you need to break out of the abstraction model
provided by CliWrap.
This overload comes with no warranty and using it may lead to unexpected behavior.
This method can be awaited.
Executes the command asynchronously.
This method can be awaited.
Executes the command asynchronously.
This method can be awaited.
Creates a new command that pipes its standard output to the specified target.
Creates a new command that pipes its standard output to the specified stream.
Creates a new command that pipes its standard output to the specified string builder.
Uses for decoding.
Creates a new command that pipes its standard output line-by-line to the specified
asynchronous delegate.
Uses for decoding.
Creates a new command that pipes its standard output line-by-line to the specified
asynchronous delegate.
Uses for decoding.
Creates a new command that pipes its standard output line-by-line to the specified
synchronous delegate.
Uses for decoding.
Creates a new command that pipes its standard output and standard error to the
specified targets.
Creates a new command that pipes its standard output and standard error to the
specified streams.
Creates a new command that pipes its standard output and standard error to the
specified string builders.
Uses for decoding.
Creates a new command that pipes its standard output and standard error line-by-line
to the specified asynchronous delegates.
Uses for decoding.
Creates a new command that pipes its standard output and standard error line-by-line
to the specified asynchronous delegates.
Uses for decoding.
Creates a new command that pipes its standard output and standard error line-by-line
to the specified synchronous delegates.
Uses for decoding.
Creates a new command that pipes its standard input from the specified source.
Creates a new command that pipes its standard input from the specified stream.
Creates a new command that pipes its standard input from the specified memory buffer.
Creates a new command that pipes its standard input from the specified byte array.
Creates a new command that pipes its standard input from the specified string.
Uses for encoding.
Creates a new command that pipes its standard input from the standard output of the
specified command.
Result of a command execution.
Result of a command execution.
Exit code set by the underlying process.
Whether the command execution was successful (i.e. exit code is zero).
Time at which the command started executing.
Time at which the command finished executing.
Total duration of the command execution.
Strategy used for validating the result of a command execution.
No validation.
Ensure that the command returned a zero exit code.
Represents an asynchronous execution of a command.
Represents an asynchronous execution of a command.
Underlying task.
Underlying process ID.
Lazily maps the result of the task using the specified transform.
Gets the awaiter of the underlying task.
Used to enable await expressions on this object.
Configures an awaiter used to await this task.
Converts the command task into a regular task.
User credentials used for starting a process.
For information on platform support, see attributes on ,
, and
.
User credentials used for starting a process.
For information on platform support, see attributes on ,
, and
.
Initializes an instance of .
Active Directory domain used for starting the process.
Only supported on Windows.
Username used for starting the process.
Password used for starting the process.
Only supported on Windows.
Whether to load the user profile when starting the process.
Only supported on Windows.
Empty credentials.
Abstract event produced by a command.
Use pattern matching to handle specific instances of this type.
Can be either one of the following:
Event triggered when the command starts executing.
May only appear once in the event stream.
Event triggered when the command starts executing.
May only appear once in the event stream.
Underlying process ID.
Event triggered when the underlying process writes a line of text to the standard output stream.
Event triggered when the underlying process writes a line of text to the standard output stream.
Line of text written to the standard output stream.
Event triggered when the underlying process writes a line of text to the standard error stream.
Event triggered when the underlying process writes a line of text to the standard error stream.
Line of text written to the standard error stream.
Event triggered when the command finishes executing.
May only appear once in the event stream.
Event triggered when the command finishes executing.
May only appear once in the event stream.
Exit code set by the underlying process.
Event stream execution model.
Event stream execution model.
Executes the command as a pull-based event stream.
Use pattern matching to handle specific instances of .
Executes the command as a pull-based event stream.
Use pattern matching to handle specific instances of .
Executes the command as a pull-based event stream.
Use pattern matching to handle specific instances of .
Executes the command as a pull-based event stream.
Uses for decoding.
Use pattern matching to handle specific instances of .
Executes the command as a push-based event stream.
Use pattern matching to handle specific instances of .
Executes the command as a push-based event stream.
Use pattern matching to handle specific instances of .
Executes the command as a push-based event stream.
Use pattern matching to handle specific instances of .
Executes the command as a push-based event stream.
Uses for decoding.
Use pattern matching to handle specific instances of .
Parent class for exceptions thrown by .
Parent class for exceptions thrown by .
Initializes an instance of .
Exception thrown when the command fails to execute correctly.
Exception thrown when the command fails to execute correctly.
Initializes an instance of .
Command that triggered the exception.
Exit code returned by the process.
Instructions for running a process.
File path of the executable, batch file, or script, that this command runs.
Command-line arguments passed to the underlying process.
Working directory path set for the underlying process.
Resource policy set for the underlying process.
User credentials set for the underlying process.
Environment variables set for the underlying process.
Strategy for validating the result of the execution.
Pipe source for the standard input stream of the underlying process.
Pipe target for the standard output stream of the underlying process.
Pipe target for the standard error stream of the underlying process.
Represents a pipe for the process's standard input stream.
Reads the binary content pushed into the pipe and writes it to the destination stream.
Destination stream represents the process's standard input stream.
Pipe source that does not provide any data.
Functionally equivalent to a null device.
Creates an anonymous pipe source with the method
implemented by the specified asynchronous delegate.
Creates an anonymous pipe source with the method
implemented by the specified synchronous delegate.
Creates a pipe source that reads from the specified stream.
Creates a pipe source that reads from the specified stream.
Creates a pipe source that reads from the specified file.
Creates a pipe source that reads from the specified memory buffer.
Creates a pipe source that reads from the specified byte array.
Creates a pipe source that reads from the specified string.
Creates a pipe source that reads from the specified string.
Uses for encoding.
Creates a pipe source that reads from the standard output of the specified command.
Creates a pipe source that reads from the standard output of the specified command.
Represents a pipe for the process's standard output or standard error stream.
Reads the binary content from the origin stream and pushes it into the pipe.
Origin stream represents the process's standard output or standard error stream.
Pipe target that discards all data.
Functionally equivalent to a null device.
Using this target results in the corresponding stream (standard output or standard error)
not being opened for the underlying process at all.
In the vast majority of cases, this behavior should be functionally equivalent to piping
to a null stream, but without the performance overhead of consuming and discarding unneeded data.
This may be undesirable in certain situations, in which case it's recommended to pipe to a
null stream explicitly using with .
Creates an anonymous pipe target with the method
implemented by the specified asynchronous delegate.
Creates an anonymous pipe target with the method
implemented by the specified synchronous delegate.
Creates a pipe target that writes to the specified stream.
Creates a pipe target that writes to the specified stream.
Creates a pipe target that writes to the specified file.
Creates a pipe target that writes to the specified string builder.
Creates a pipe target that writes to the specified string builder.
Uses for decoding.
Creates a pipe target that invokes the specified asynchronous delegate on every line written to the stream.
Creates a pipe target that invokes the specified asynchronous delegate on every line written to the stream.
Uses for decoding.
Creates a pipe target that invokes the specified asynchronous delegate on every line written to the stream.
Creates a pipe target that invokes the specified asynchronous delegate on every line written to the stream.
Uses for decoding.
Creates a pipe target that invokes the specified synchronous delegate on every line written to the stream.
Creates a pipe target that invokes the specified synchronous delegate on every line written to the stream.
Uses for decoding.
Creates a pipe target that replicates data over multiple inner targets.
Creates a pipe target that replicates data over multiple inner targets.
Resource policy assigned to a process.
For information on platform support, see attributes on ,
, and
.
Resource policy assigned to a process.
For information on platform support, see attributes on ,
, and
.
Priority class of the process.
Processor core affinity mask of the process.
Minimum working set size of the process.
Maximum working set size of the process.
Default resource policy.