INodeServices.InvokeExportAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
InvokeExportAsync<T>(String, String, Object[]) |
Asynchronously invokes code in the Node.js instance. |
InvokeExportAsync<T>(CancellationToken, String, String, Object[]) |
Asynchronously invokes code in the Node.js instance. |
InvokeExportAsync<T>(String, String, Object[])
Asynchronously invokes code in the Node.js instance.
public:
generic <typename T>
System::Threading::Tasks::Task<T> ^ InvokeExportAsync(System::String ^ moduleName, System::String ^ exportedFunctionName, ... cli::array <System::Object ^> ^ args);
public System.Threading.Tasks.Task<T> InvokeExportAsync<T> (string moduleName, string exportedFunctionName, params object[] args);
abstract member InvokeExportAsync : string * string * obj[] -> System.Threading.Tasks.Task<'T>
Public Function InvokeExportAsync(Of T) (moduleName As String, exportedFunctionName As String, ParamArray args As Object()) As Task(Of T)
Type Parameters
- T
The JSON-serializable data type that the Node.js code will asynchronously return.
Parameters
- moduleName
- String
The path to the Node.js module (i.e., JavaScript file) relative to your project root that contains the code to be invoked.
- exportedFunctionName
- String
Specifies the CommonJS export to be invoked.
- args
- Object[]
Any sequence of JSON-serializable arguments to be passed to the Node.js function.
Returns
A Task<TResult> representing the completion of the RPC call.
Applies to
InvokeExportAsync<T>(CancellationToken, String, String, Object[])
Asynchronously invokes code in the Node.js instance.
public:
generic <typename T>
System::Threading::Tasks::Task<T> ^ InvokeExportAsync(System::Threading::CancellationToken cancellationToken, System::String ^ moduleName, System::String ^ exportedFunctionName, ... cli::array <System::Object ^> ^ args);
public System.Threading.Tasks.Task<T> InvokeExportAsync<T> (System.Threading.CancellationToken cancellationToken, string moduleName, string exportedFunctionName, params object[] args);
abstract member InvokeExportAsync : System.Threading.CancellationToken * string * string * obj[] -> System.Threading.Tasks.Task<'T>
Public Function InvokeExportAsync(Of T) (cancellationToken As CancellationToken, moduleName As String, exportedFunctionName As String, ParamArray args As Object()) As Task(Of T)
Type Parameters
- T
The JSON-serializable data type that the Node.js code will asynchronously return.
Parameters
- cancellationToken
- CancellationToken
A CancellationToken that can be used to cancel the invocation.
- moduleName
- String
The path to the Node.js module (i.e., JavaScript file) relative to your project root that contains the code to be invoked.
- exportedFunctionName
- String
Specifies the CommonJS export to be invoked.
- args
- Object[]
Any sequence of JSON-serializable arguments to be passed to the Node.js function.
Returns
A Task<TResult> representing the completion of the RPC call.