Dela via


OutOfProcessNodeInstance.InvokeExportAsync Method

Definition

Overloads

InvokeExportAsync<T>(NodeInvocationInfo, CancellationToken)

Asynchronously invokes code in the Node.js instance.

InvokeExportAsync<T>(CancellationToken, String, String, Object[])

Asynchronously invokes code in the Node.js instance.

InvokeExportAsync<T>(NodeInvocationInfo, CancellationToken)

Source:
OutOfProcessNodeInstance.cs
Source:
OutOfProcessNodeInstance.cs
Source:
OutOfProcessNodeInstance.cs
Source:
OutOfProcessNodeInstance.cs

Asynchronously invokes code in the Node.js instance.

protected:
generic <typename T>
 abstract System::Threading::Tasks::Task<T> ^ InvokeExportAsync(Microsoft::AspNetCore::NodeServices::HostingModels::NodeInvocationInfo ^ invocationInfo, System::Threading::CancellationToken cancellationToken);
protected abstract System.Threading.Tasks.Task<T> InvokeExportAsync<T> (Microsoft.AspNetCore.NodeServices.HostingModels.NodeInvocationInfo invocationInfo, System.Threading.CancellationToken cancellationToken);
abstract member InvokeExportAsync : Microsoft.AspNetCore.NodeServices.HostingModels.NodeInvocationInfo * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
Protected MustOverride Function InvokeExportAsync(Of T) (invocationInfo As NodeInvocationInfo, cancellationToken As CancellationToken) As Task(Of T)

Type Parameters

T

The JSON-serializable data type that the Node.js code will asynchronously return.

Parameters

invocationInfo
NodeInvocationInfo

Specifies the Node.js function to be invoked and arguments to be passed to it.

cancellationToken
CancellationToken

A CancellationToken that can be used to cancel the invocation.

Returns

Task<T>

A Task<TResult> representing the completion of the RPC call.

Applies to

InvokeExportAsync<T>(CancellationToken, String, String, Object[])

Source:
OutOfProcessNodeInstance.cs
Source:
OutOfProcessNodeInstance.cs
Source:
OutOfProcessNodeInstance.cs
Source:
OutOfProcessNodeInstance.cs

Asynchronously invokes code in the Node.js instance.

public:
generic <typename T>
 virtual System::Threading::Tasks::Task<T> ^ InvokeExportAsync(System::Threading::CancellationToken cancellationToken, System::String ^ moduleName, System::String ^ exportNameOrNull, ... cli::array <System::Object ^> ^ args);
public System.Threading.Tasks.Task<T> InvokeExportAsync<T> (System.Threading.CancellationToken cancellationToken, string moduleName, string exportNameOrNull, params object[] args);
abstract member InvokeExportAsync : System.Threading.CancellationToken * string * string * obj[] -> System.Threading.Tasks.Task<'T>
override this.InvokeExportAsync : System.Threading.CancellationToken * string * string * obj[] -> System.Threading.Tasks.Task<'T>
Public Function InvokeExportAsync(Of T) (cancellationToken As CancellationToken, moduleName As String, exportNameOrNull 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.

exportNameOrNull
String

If set, specifies the CommonJS export to be invoked. If not set, the module's default CommonJS export itself must be a function to be invoked.

args
Object[]

Any sequence of JSON-serializable arguments to be passed to the Node.js function.

Returns

Task<T>

A Task<TResult> representing the completion of the RPC call.

Implements

Applies to