Interface IProcessStarterFactory
Interface for process starter factory.
Namespace: Kephas.Diagnostics
Assembly: Kephas.Core.dll
Syntax
[AppServiceContract]
public interface IProcessStarterFactory
Methods
| Improve this Doc View SourceCreateProcessStarter()
Creates the process starter.
Declaration
IProcessStarter CreateProcessStarter()
Returns
Type | Description |
---|---|
IProcessStarter | The new ProcessStarter. |
GetProcessStartInfo()
Gets the process start information.
Declaration
ProcessStartInfo GetProcessStartInfo()
Returns
Type | Description |
---|---|
System.Diagnostics.ProcessStartInfo | The process start information. |
WithArguments(String[])
Sets the process arguments.
Declaration
IProcessStarterFactory WithArguments(params string[] args)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | args | A variable-length parameters list containing arguments. |
Returns
Type | Description |
---|---|
IProcessStarterFactory | This IProcessStarterFactory. |
WithEnvironmentVariable(String, String)
Sets an environment variable for the process.
Declaration
IProcessStarterFactory WithEnvironmentVariable(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The variable name. |
System.String | value | The variable value. |
Returns
Type | Description |
---|---|
IProcessStarterFactory | This IProcessStarterFactory. |
WithManagedExecutable(String)
Sets the executable file as a managed process.
Declaration
IProcessStarterFactory WithManagedExecutable(string executableFile)
Parameters
Type | Name | Description |
---|---|---|
System.String | executableFile | Full pathname of the executable file. |
Returns
Type | Description |
---|---|
IProcessStarterFactory | This IProcessStarterFactory. |
WithNativeExecutable(String)
Sets the executable file as an operating system native process.
Declaration
IProcessStarterFactory WithNativeExecutable(string executableFile)
Parameters
Type | Name | Description |
---|---|---|
System.String | executableFile | Full pathname of the executable file. |
Returns
Type | Description |
---|---|
IProcessStarterFactory | This IProcessStarterFactory. |
WithProcessStartInfoConfig(Action<ProcessStartInfo>)
Adds further confiuguration to the process information.
Declaration
IProcessStarterFactory WithProcessStartInfoConfig(Action<ProcessStartInfo> config)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.Diagnostics.ProcessStartInfo> | config | The configuration. |
Returns
Type | Description |
---|---|
IProcessStarterFactory | This IProcessStarterFactory. |
WithShell(Boolean)
Indicates whether the process should use the shell execution (for console display).
Declaration
IProcessStarterFactory WithShell(bool useShell = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | useShell | Optional. True to use shell. |
Returns
Type | Description |
---|---|
IProcessStarterFactory | This IProcessStarterFactory. |
WithWorkingDirectory(String)
Sets the process working directory.
Declaration
IProcessStarterFactory WithWorkingDirectory(string workingDirectory)
Parameters
Type | Name | Description |
---|---|---|
System.String | workingDirectory | Pathname of the working directory. |
Returns
Type | Description |
---|---|
IProcessStarterFactory | This IProcessStarterFactory. |