Interface IProcessBuilder
Provides a fluent API on top of System.Diagnostics.ProcessStartInfo to make launching processes easier and cleaner.
Namespace: Snowflake.Orchestration.Process
Assembly: Snowflake.Framework.Primitives.dll
Syntax
public interface IProcessBuilder
Methods
ToProcessStartInfo()
Create a System.Diagnostics.ProcessStartInfo from this builder.
Declaration
ProcessStartInfo ToProcessStartInfo()
Returns
| Type | Description |
|---|---|
| System.Diagnostics.ProcessStartInfo | The System.Diagnostics.ProcessStartInfo with the given arguments. |
WithArgument(String)
Adds a switch type argument to the launching process.
Declaration
IProcessBuilder WithArgument(string switchName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | switchName | The argument to add. |
Returns
| Type | Description |
|---|---|
| IProcessBuilder | The instance of IProcessBuilder. |
WithArgument(String, String, Boolean)
Adds a space separated parameter-type argument to the launching process.
Declaration
IProcessBuilder WithArgument(string parameterName, string value, bool quoted = true)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | parameterName | The name of the parameter, |
| System.String | value | The value of the argument. |
| System.Boolean | quoted | Whether or not the value is enclosed in double quotes. |
Returns
| Type | Description |
|---|---|
| IProcessBuilder | The instance of IProcessBuilder |