NodejsEnvironment.Run method (1 of 2)
Runs an action on the JS thread, and waits for completion.
C#
public void Run(Action action)
parameter | description |
---|---|
action | The action to run. |
Exceptions
exception | condition |
---|---|
JSException | Any exception thrown by the action is wrapped in a JS exception. The original exception is available via the InnerException property. |
See Also
- class NodejsEnvironment
- namespace Microsoft.JavaScript.NodeApi.Runtime
NodejsEnvironment.Run<T> method (2 of 2)
Runs an action on the JS thread, and waits for the return value.
C#
public T Run<T>(Func<T> action)
parameter | description |
---|---|
action | The action to run. |
Exceptions
exception | condition |
---|---|
JSException | Any exception thrown by the action is wrapped in a JS exception. The original exception is available via the InnerException property. |
See Also
- class NodejsEnvironment
- namespace Microsoft.JavaScript.NodeApi.Runtime