Process
Overview
Process execution apis.
Location
- Reference: Island.fx
- Namespace: RemObjects.Elements.System
constructor
constructor
Process()
init()
Process()
Sub New()
constructor (String, ImmutableList<String>, ImmutableDictionary<String, String>, String)
Creates a new instance of this class with a given command, arguments and environemnt.
constructor(aCommand: String; aArguments: ImmutableList<String>; aEnvironment: ImmutableDictionary<String, String>; aWorkingDirectory: String)
Process(String aCommand, ImmutableList<String> aArguments, ImmutableDictionary<String, String> aEnvironment, String aWorkingDirectory)
init(_ aCommand: String, _ aArguments: ImmutableList<String>, _ aEnvironment: ImmutableDictionary<String, String>, _ aWorkingDirectory: String)
Process(String aCommand, ImmutableList<String> aArguments, ImmutableDictionary<String, String> aEnvironment, String aWorkingDirectory)
Sub New(aCommand As String, aArguments As ImmutableList<String>, aEnvironment As ImmutableDictionary<String, String>, aWorkingDirectory As String)
Parameters:
- aCommand:
- aArguments:
- aEnvironment:
- aWorkingDirectory:
Arguments
Arguments to pass to this process.
property Arguments: ImmutableList<String> read write;
ImmutableList<String> Arguments { get; set; }
var Arguments: ImmutableList<String> { get{} set{} }
ImmutableList<String> Arguments { __get; __set; }
Property Arguments() As ImmutableList<String>
Command
Command to execute.
property Command: String read write;
String Command { get; set; }
var Command: String { get{} set{} }
String Command { __get; __set; }
Property Command() As String
CurrentProcessId
Returns the current process' id.
class method CurrentProcessId: Int32
static Int32 CurrentProcessId()
static func CurrentProcessId() -> Int32
static Int32 CurrentProcessId()
Shared Function CurrentProcessId() As Int32
Environment
Environment to pass.
property Environment: ImmutableDictionary<String, String> read write;
ImmutableDictionary<String, String> Environment { get; set; }
var Environment: ImmutableDictionary<String, String> { get{} set{} }
ImmutableDictionary<String, String> Environment { __get; __set; }
Property Environment() As ImmutableDictionary<String, String>
Equals virtual (declared in Object)
Default constructor.
Parameters:
- aOther: the reference to compare this with.
ExitCode
Return code when this process is done running.
property ExitCode: Int32 read;
Int32 ExitCode { get; }
var ExitCode: Int32 { get{} }
Int32 ExitCode { __get; }
ReadOnly Property ExitCode() As Int32
Finalize protected virtual (declared in Object)
method Finalize
void Finalize()
func Finalize()
void Finalize()
Sub Finalize()
FreeLibrary
class method FreeLibrary(aLibrary: IntPtr)
static void FreeLibrary(IntPtr aLibrary)
static func FreeLibrary(_ aLibrary: IntPtr)
static void FreeLibrary(IntPtr aLibrary)
Shared Sub FreeLibrary(aLibrary As IntPtr)
Parameters:
- aLibrary:
GetCachedProcAddress
Parameters:
- aLibrary:
- aSymbol:
GetHashCode virtual (declared in Object)
Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.
method GetHashCode: Int32
Int32 GetHashCode()
func GetHashCode() -> Int32
Int32 GetHashCode()
Function GetHashCode() As Int32
GetProcAddress
Parameters:
- aLibrary:
- aProc:
GetType (declared in Object)
Returns the actual type of this class
method GetType: Type
Type GetType()
func GetType() -> Type
Type GetType()
Function GetType() As Type
Id
Returns the process id of this instance.
property Id: Int32 read;
Int32 Id { get; }
var Id: Int32 { get{} }
Int32 Id { __get; }
ReadOnly Property Id() As Int32
IsRunning
returns true if this process is running.
property IsRunning: Boolean read;
Boolean IsRunning { get; }
var IsRunning: Boolean { get{} }
Boolean IsRunning { __get; }
ReadOnly Property IsRunning() As Boolean
LoadLibrary
Parameters:
- aLibrary:
- aRaiseError:
OnErrorData
Called when STDERR data is available.
property OnErrorData: Action<RemObjects.Elements.System.String> read;
Action<RemObjects.Elements.System.String> OnErrorData { get; }
var OnErrorData: Action<RemObjects.Elements.System.String> { get{} }
Action<RemObjects.Elements.System.String> OnErrorData { __get; }
ReadOnly Property OnErrorData() As Action<RemObjects.Elements.System.String>
OnFinished
Called when the project is finished running.
property OnFinished: Action<RemObjects.Elements.System.Int32> read;
Action<RemObjects.Elements.System.Int32> OnFinished { get; }
var OnFinished: Action<RemObjects.Elements.System.Int32> { get{} }
Action<RemObjects.Elements.System.Int32> OnFinished { __get; }
ReadOnly Property OnFinished() As Action<RemObjects.Elements.System.Int32>
OnOutputData
Called when STDOUT data is available.
property OnOutputData: Action<RemObjects.Elements.System.String> read;
Action<RemObjects.Elements.System.String> OnOutputData { get; }
var OnOutputData: Action<RemObjects.Elements.System.String> { get{} }
Action<RemObjects.Elements.System.String> OnOutputData { __get; }
ReadOnly Property OnOutputData() As Action<RemObjects.Elements.System.String>
RedirectInput
property RedirectInput: Boolean read write;
Boolean RedirectInput { get; set; }
var RedirectInput: Boolean { get{} set{} }
Boolean RedirectInput { __get; __set; }
Property RedirectInput() As Boolean
RedirectOutput
Set to true to redirect the output of this process.
property RedirectOutput: Boolean read write;
Boolean RedirectOutput { get; set; }
var RedirectOutput: Boolean { get{} set{} }
Boolean RedirectOutput { __get; __set; }
Property RedirectOutput() As Boolean
ReferenceEquals (declared in Object)
Compares two references for equivalence (even if they have an equals operator)
Parameters:
- a: left value
- b: right value
Run
Wrapper around process that runs and waits.
class method Run(aCommand: not nullable String; aArguments: ImmutableList<String>; aEnvironment: nullable ImmutableDictionary<String, String>; aWorkingDirectory: nullable String; out aStdOut: String; out aStdErr: String): Int32
static Int32 Run(String! aCommand, ImmutableList<String> aArguments, ImmutableDictionary<String, String>? aEnvironment, String? aWorkingDirectory, out String aStdOut, out String aStdErr)
static func Run(_ aCommand: String, _ aArguments: ImmutableList<String>, _ aEnvironment: ImmutableDictionary<String, String>?, _ aWorkingDirectory: String?, _ aStdOut: String, _ aStdErr: String) -> Int32
static Int32 Run(String aCommand, ImmutableList<String> aArguments, ImmutableDictionary<String, String> aEnvironment, String aWorkingDirectory, __out String aStdOut, __out String aStdErr)
Shared Function Run(aCommand As String, aArguments As ImmutableList<String>, aEnvironment As ImmutableDictionary<String, String>?, aWorkingDirectory As String?, <OutAttribute> ByRef aStdOut As String, <OutAttribute> ByRef aStdErr As String) As Int32
Parameters:
- aCommand:
- aArguments:
- aEnvironment:
- aWorkingDirectory:
- aStdOut:
- aStdErr:
RunAsync
Wrapper around process that runs a process.
class method RunAsync(aCommand: not nullable String; aArguments: ImmutableList<String>; aEnvironment: nullable ImmutableDictionary<String, String>; aWorkingDirectory: nullable String; aStdOutCallback: Action<RemObjects.Elements.System.String>; aStdErrCallback: Action<RemObjects.Elements.System.String>; aFinishedCallback: Action<RemObjects.Elements.System.Int32>): Process
static Process RunAsync(String! aCommand, ImmutableList<String> aArguments, ImmutableDictionary<String, String>? aEnvironment, String? aWorkingDirectory, Action<RemObjects.Elements.System.String> aStdOutCallback, Action<RemObjects.Elements.System.String> aStdErrCallback, Action<RemObjects.Elements.System.Int32> aFinishedCallback)
static func RunAsync(_ aCommand: String, _ aArguments: ImmutableList<String>, _ aEnvironment: ImmutableDictionary<String, String>?, _ aWorkingDirectory: String?, _ aStdOutCallback: Action<RemObjects.Elements.System.String>, _ aStdErrCallback: Action<RemObjects.Elements.System.String>, _ aFinishedCallback: Action<RemObjects.Elements.System.Int32>) -> Process
static Process RunAsync(String aCommand, ImmutableList<String> aArguments, ImmutableDictionary<String, String> aEnvironment, String aWorkingDirectory, Action<RemObjects.Elements.System.String> aStdOutCallback, Action<RemObjects.Elements.System.String> aStdErrCallback, Action<RemObjects.Elements.System.Int32> aFinishedCallback)
Shared Function RunAsync(aCommand As String, aArguments As ImmutableList<String>, aEnvironment As ImmutableDictionary<String, String>?, aWorkingDirectory As String?, aStdOutCallback As Action<RemObjects.Elements.System.String>, aStdErrCallback As Action<RemObjects.Elements.System.String>, aFinishedCallback As Action<RemObjects.Elements.System.Int32>) As Process
Parameters:
- aCommand:
- aArguments:
- aEnvironment:
- aWorkingDirectory:
- aStdOutCallback:
- aStdErrCallback:
- aFinishedCallback:
StandardError
Read data from stdout.
property StandardError: String read;
String StandardError { get; }
var StandardError: String { get{} }
String StandardError { __get; }
ReadOnly Property StandardError() As String
StandardErrorStream
property StandardErrorStream: Stream read;
Stream StandardErrorStream { get; }
var StandardErrorStream: Stream { get{} }
Stream StandardErrorStream { __get; }
ReadOnly Property StandardErrorStream() As Stream
StandardInputStream
property StandardInputStream: Stream read;
Stream StandardInputStream { get; }
var StandardInputStream: Stream { get{} }
Stream StandardInputStream { __get; }
ReadOnly Property StandardInputStream() As Stream
StandardOutput
Read data from stderr.
property StandardOutput: String read;
String StandardOutput { get; }
var StandardOutput: String { get{} }
String StandardOutput { __get; }
ReadOnly Property StandardOutput() As String
StandardOutputStream
property StandardOutputStream: Stream read;
Stream StandardOutputStream { get; }
var StandardOutputStream: Stream { get{} }
Stream StandardOutputStream { __get; }
ReadOnly Property StandardOutputStream() As Stream
Start
Start the process.
method Start: Boolean
Boolean Start()
func Start() -> Boolean
Boolean Start()
Function Start() As Boolean
Stop
method Stop
void Stop()
func Stop()
void Stop()
Sub Stop()
ToString virtual (declared in Object)
Gets the string representation of this method.
method ToString: String
String ToString()
func ToString() -> String
String ToString()
Function ToString() As String
WaitFor
method WaitFor
void WaitFor()
func WaitFor()
void WaitFor()
Sub WaitFor()
WorkingDirectory
Sets the working dir.
Arguments
Arguments to pass to this process.
property Arguments: ImmutableList<String> read write;
ImmutableList<String> Arguments { get; set; }
var Arguments: ImmutableList<String> { get{} set{} }
ImmutableList<String> Arguments { __get; __set; }
Property Arguments() As ImmutableList<String>
Command
Command to execute.
property Command: String read write;
String Command { get; set; }
var Command: String { get{} set{} }
String Command { __get; __set; }
Property Command() As String
Environment
Environment to pass.
property Environment: ImmutableDictionary<String, String> read write;
ImmutableDictionary<String, String> Environment { get; set; }
var Environment: ImmutableDictionary<String, String> { get{} set{} }
ImmutableDictionary<String, String> Environment { __get; __set; }
Property Environment() As ImmutableDictionary<String, String>
ExitCode
Return code when this process is done running.
property ExitCode: Int32 read;
Int32 ExitCode { get; }
var ExitCode: Int32 { get{} }
Int32 ExitCode { __get; }
ReadOnly Property ExitCode() As Int32
Id
Returns the process id of this instance.
property Id: Int32 read;
Int32 Id { get; }
var Id: Int32 { get{} }
Int32 Id { __get; }
ReadOnly Property Id() As Int32
IsRunning
returns true if this process is running.
property IsRunning: Boolean read;
Boolean IsRunning { get; }
var IsRunning: Boolean { get{} }
Boolean IsRunning { __get; }
ReadOnly Property IsRunning() As Boolean
OnErrorData
Called when STDERR data is available.
property OnErrorData: Action<RemObjects.Elements.System.String> read;
Action<RemObjects.Elements.System.String> OnErrorData { get; }
var OnErrorData: Action<RemObjects.Elements.System.String> { get{} }
Action<RemObjects.Elements.System.String> OnErrorData { __get; }
ReadOnly Property OnErrorData() As Action<RemObjects.Elements.System.String>
OnFinished
Called when the project is finished running.
property OnFinished: Action<RemObjects.Elements.System.Int32> read;
Action<RemObjects.Elements.System.Int32> OnFinished { get; }
var OnFinished: Action<RemObjects.Elements.System.Int32> { get{} }
Action<RemObjects.Elements.System.Int32> OnFinished { __get; }
ReadOnly Property OnFinished() As Action<RemObjects.Elements.System.Int32>
OnOutputData
Called when STDOUT data is available.
property OnOutputData: Action<RemObjects.Elements.System.String> read;
Action<RemObjects.Elements.System.String> OnOutputData { get; }
var OnOutputData: Action<RemObjects.Elements.System.String> { get{} }
Action<RemObjects.Elements.System.String> OnOutputData { __get; }
ReadOnly Property OnOutputData() As Action<RemObjects.Elements.System.String>
RedirectInput
property RedirectInput: Boolean read write;
Boolean RedirectInput { get; set; }
var RedirectInput: Boolean { get{} set{} }
Boolean RedirectInput { __get; __set; }
Property RedirectInput() As Boolean
RedirectOutput
Set to true to redirect the output of this process.
property RedirectOutput: Boolean read write;
Boolean RedirectOutput { get; set; }
var RedirectOutput: Boolean { get{} set{} }
Boolean RedirectOutput { __get; __set; }
Property RedirectOutput() As Boolean
StandardError
Read data from stdout.
property StandardError: String read;
String StandardError { get; }
var StandardError: String { get{} }
String StandardError { __get; }
ReadOnly Property StandardError() As String
StandardErrorStream
property StandardErrorStream: Stream read;
Stream StandardErrorStream { get; }
var StandardErrorStream: Stream { get{} }
Stream StandardErrorStream { __get; }
ReadOnly Property StandardErrorStream() As Stream
StandardInputStream
property StandardInputStream: Stream read;
Stream StandardInputStream { get; }
var StandardInputStream: Stream { get{} }
Stream StandardInputStream { __get; }
ReadOnly Property StandardInputStream() As Stream
StandardOutput
Read data from stderr.
property StandardOutput: String read;
String StandardOutput { get; }
var StandardOutput: String { get{} }
String StandardOutput { __get; }
ReadOnly Property StandardOutput() As String
StandardOutputStream
property StandardOutputStream: Stream read;
Stream StandardOutputStream { get; }
var StandardOutputStream: Stream { get{} }
Stream StandardOutputStream { __get; }
ReadOnly Property StandardOutputStream() As Stream
WorkingDirectory
Sets the working dir.
CurrentProcessId
Returns the current process' id.
class method CurrentProcessId: Int32
static Int32 CurrentProcessId()
static func CurrentProcessId() -> Int32
static Int32 CurrentProcessId()
Shared Function CurrentProcessId() As Int32
FreeLibrary
class method FreeLibrary(aLibrary: IntPtr)
static void FreeLibrary(IntPtr aLibrary)
static func FreeLibrary(_ aLibrary: IntPtr)
static void FreeLibrary(IntPtr aLibrary)
Shared Sub FreeLibrary(aLibrary As IntPtr)
Parameters:
- aLibrary:
GetCachedProcAddress
Parameters:
- aLibrary:
- aSymbol:
GetProcAddress
Parameters:
- aLibrary:
- aProc:
LoadLibrary
Parameters:
- aLibrary:
- aRaiseError:
ReferenceEquals (declared in Object)
Compares two references for equivalence (even if they have an equals operator)
Parameters:
- a: left value
- b: right value
Run
Wrapper around process that runs and waits.
class method Run(aCommand: not nullable String; aArguments: ImmutableList<String>; aEnvironment: nullable ImmutableDictionary<String, String>; aWorkingDirectory: nullable String; out aStdOut: String; out aStdErr: String): Int32
static Int32 Run(String! aCommand, ImmutableList<String> aArguments, ImmutableDictionary<String, String>? aEnvironment, String? aWorkingDirectory, out String aStdOut, out String aStdErr)
static func Run(_ aCommand: String, _ aArguments: ImmutableList<String>, _ aEnvironment: ImmutableDictionary<String, String>?, _ aWorkingDirectory: String?, _ aStdOut: String, _ aStdErr: String) -> Int32
static Int32 Run(String aCommand, ImmutableList<String> aArguments, ImmutableDictionary<String, String> aEnvironment, String aWorkingDirectory, __out String aStdOut, __out String aStdErr)
Shared Function Run(aCommand As String, aArguments As ImmutableList<String>, aEnvironment As ImmutableDictionary<String, String>?, aWorkingDirectory As String?, <OutAttribute> ByRef aStdOut As String, <OutAttribute> ByRef aStdErr As String) As Int32
Parameters:
- aCommand:
- aArguments:
- aEnvironment:
- aWorkingDirectory:
- aStdOut:
- aStdErr:
RunAsync
Wrapper around process that runs a process.
class method RunAsync(aCommand: not nullable String; aArguments: ImmutableList<String>; aEnvironment: nullable ImmutableDictionary<String, String>; aWorkingDirectory: nullable String; aStdOutCallback: Action<RemObjects.Elements.System.String>; aStdErrCallback: Action<RemObjects.Elements.System.String>; aFinishedCallback: Action<RemObjects.Elements.System.Int32>): Process
static Process RunAsync(String! aCommand, ImmutableList<String> aArguments, ImmutableDictionary<String, String>? aEnvironment, String? aWorkingDirectory, Action<RemObjects.Elements.System.String> aStdOutCallback, Action<RemObjects.Elements.System.String> aStdErrCallback, Action<RemObjects.Elements.System.Int32> aFinishedCallback)
static func RunAsync(_ aCommand: String, _ aArguments: ImmutableList<String>, _ aEnvironment: ImmutableDictionary<String, String>?, _ aWorkingDirectory: String?, _ aStdOutCallback: Action<RemObjects.Elements.System.String>, _ aStdErrCallback: Action<RemObjects.Elements.System.String>, _ aFinishedCallback: Action<RemObjects.Elements.System.Int32>) -> Process
static Process RunAsync(String aCommand, ImmutableList<String> aArguments, ImmutableDictionary<String, String> aEnvironment, String aWorkingDirectory, Action<RemObjects.Elements.System.String> aStdOutCallback, Action<RemObjects.Elements.System.String> aStdErrCallback, Action<RemObjects.Elements.System.Int32> aFinishedCallback)
Shared Function RunAsync(aCommand As String, aArguments As ImmutableList<String>, aEnvironment As ImmutableDictionary<String, String>?, aWorkingDirectory As String?, aStdOutCallback As Action<RemObjects.Elements.System.String>, aStdErrCallback As Action<RemObjects.Elements.System.String>, aFinishedCallback As Action<RemObjects.Elements.System.Int32>) As Process
Parameters:
- aCommand:
- aArguments:
- aEnvironment:
- aWorkingDirectory:
- aStdOutCallback:
- aStdErrCallback:
- aFinishedCallback:
constructor
constructor
Process()
init()
Process()
Sub New()
constructor (String, ImmutableList<String>, ImmutableDictionary<String, String>, String)
Creates a new instance of this class with a given command, arguments and environemnt.
constructor(aCommand: String; aArguments: ImmutableList<String>; aEnvironment: ImmutableDictionary<String, String>; aWorkingDirectory: String)
Process(String aCommand, ImmutableList<String> aArguments, ImmutableDictionary<String, String> aEnvironment, String aWorkingDirectory)
init(_ aCommand: String, _ aArguments: ImmutableList<String>, _ aEnvironment: ImmutableDictionary<String, String>, _ aWorkingDirectory: String)
Process(String aCommand, ImmutableList<String> aArguments, ImmutableDictionary<String, String> aEnvironment, String aWorkingDirectory)
Sub New(aCommand As String, aArguments As ImmutableList<String>, aEnvironment As ImmutableDictionary<String, String>, aWorkingDirectory As String)
Parameters:
- aCommand:
- aArguments:
- aEnvironment:
- aWorkingDirectory:
Equals virtual (declared in Object)
Default constructor.
Parameters:
- aOther: the reference to compare this with.
Finalize protected virtual (declared in Object)
method Finalize
void Finalize()
func Finalize()
void Finalize()
Sub Finalize()
GetHashCode virtual (declared in Object)
Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.
method GetHashCode: Int32
Int32 GetHashCode()
func GetHashCode() -> Int32
Int32 GetHashCode()
Function GetHashCode() As Int32
GetType (declared in Object)
Returns the actual type of this class
method GetType: Type
Type GetType()
func GetType() -> Type
Type GetType()
Function GetType() As Type
Start
Start the process.
method Start: Boolean
Boolean Start()
func Start() -> Boolean
Boolean Start()
Function Start() As Boolean
Stop
method Stop
void Stop()
func Stop()
void Stop()
Sub Stop()
ToString virtual (declared in Object)
Gets the string representation of this method.
method ToString: String
String ToString()
func ToString() -> String
String ToString()
Function ToString() As String
WaitFor
method WaitFor
void WaitFor()
func WaitFor()
void WaitFor()
Sub WaitFor()