ICommandLineProcessAsync80
This interface, returned by the ICreator.CreateCommandLineProcessAsync method allows for asynchronous management of command line process operations associated with the launching of TerraExplorer executable tools.
Providing a callback-based mechanism similar to the JavaScript promise and the C# Task, ICommandLineProcessAsync80 supports method chaining, allowing for subsequent method calls directly on the returned object. This ensures a cleaner and more streamlined code structure, and makes asynchronous operations more intuitive to handle.
E.g.,
g_asyncObj = SGWorld.Creator.CreateCommandLineProcessAsync("my.exe param1 param2").OnStdout(function(stdout){
g_stdout += stdout;
g_asyncObj.Abort();
}).Onstderr(function(stderr){
g_stderr+=stderr;
}).OnExit(function(exitCode){
alert(exitCode);
alert(g_stderr);
alert(g_stdout);
});
See "Asynchronous Requests" in the "Overview" chapter for C# and JavaScript examples.
|
Methods |
|
|
This method is used to abort or cancel the command line process. |
|
|
This method is called when the command line process exits. |
|
|
This method is called when the launched command line process encounters an error. |
|
|
This method is called when the command line process produces output. |