Share via


JSObjectReferenceExtensions.InvokeNewAsync Method

Definition

Overloads

InvokeNewAsync(IJSObjectReference, String, Object[])

Invokes the specified JavaScript constructor function asynchronously. The function is invoked with the new operator.

InvokeNewAsync(IJSObjectReference, String, CancellationToken, Object[])

Invokes the specified JavaScript constructor function asynchronously. The function is invoked with the new operator.

InvokeNewAsync(IJSObjectReference, String, TimeSpan, Object[])

Invokes the specified JavaScript constructor function asynchronously. The function is invoked with the new operator.

InvokeNewAsync(IJSObjectReference, String, Object[])

Source:
JSObjectReferenceExtensions.cs

Invokes the specified JavaScript constructor function asynchronously. The function is invoked with the new operator.

public static System.Threading.Tasks.ValueTask<Microsoft.JSInterop.IJSObjectReference> InvokeNewAsync(this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, params object?[]? args);
static member InvokeNewAsync : Microsoft.JSInterop.IJSObjectReference * string * obj[] -> System.Threading.Tasks.ValueTask<Microsoft.JSInterop.IJSObjectReference>
<Extension()>
Public Function InvokeNewAsync (jsObjectReference As IJSObjectReference, identifier As String, ParamArray args As Object()) As ValueTask(Of IJSObjectReference)

Parameters

jsObjectReference
IJSObjectReference

The IJSObjectReference.

identifier
String

An identifier for the constructor function to invoke. For example, the value "someScope.SomeClass" will invoke the constructor someScope.SomeClass.

args
Object[]

JSON-serializable arguments.

Returns

An IJSObjectReference instance that represents the created JS object.

Applies to

InvokeNewAsync(IJSObjectReference, String, CancellationToken, Object[])

Source:
JSObjectReferenceExtensions.cs

Invokes the specified JavaScript constructor function asynchronously. The function is invoked with the new operator.

public static System.Threading.Tasks.ValueTask<Microsoft.JSInterop.IJSObjectReference> InvokeNewAsync(this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, System.Threading.CancellationToken cancellationToken, object?[]? args);
static member InvokeNewAsync : Microsoft.JSInterop.IJSObjectReference * string * System.Threading.CancellationToken * obj[] -> System.Threading.Tasks.ValueTask<Microsoft.JSInterop.IJSObjectReference>
<Extension()>
Public Function InvokeNewAsync (jsObjectReference As IJSObjectReference, identifier As String, cancellationToken As CancellationToken, args As Object()) As ValueTask(Of IJSObjectReference)

Parameters

jsObjectReference
IJSObjectReference

The IJSObjectReference.

identifier
String

An identifier for the constructor function to invoke. For example, the value "someScope.SomeClass" will invoke the constructor someScope.SomeClass.

cancellationToken
CancellationToken

A cancellation token to signal the cancellation of the operation. Specifying this parameter will override any default cancellations such as due to timeouts (DefaultAsyncTimeout) from being applied.

args
Object[]

JSON-serializable arguments.

Returns

An IJSObjectReference instance that represents the created JS object.

Applies to

InvokeNewAsync(IJSObjectReference, String, TimeSpan, Object[])

Source:
JSObjectReferenceExtensions.cs

Invokes the specified JavaScript constructor function asynchronously. The function is invoked with the new operator.

public static System.Threading.Tasks.ValueTask<Microsoft.JSInterop.IJSObjectReference> InvokeNewAsync(this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, TimeSpan timeout, object?[]? args);
static member InvokeNewAsync : Microsoft.JSInterop.IJSObjectReference * string * TimeSpan * obj[] -> System.Threading.Tasks.ValueTask<Microsoft.JSInterop.IJSObjectReference>
<Extension()>
Public Function InvokeNewAsync (jsObjectReference As IJSObjectReference, identifier As String, timeout As TimeSpan, args As Object()) As ValueTask(Of IJSObjectReference)

Parameters

jsObjectReference
IJSObjectReference

The IJSObjectReference.

identifier
String

An identifier for the constructor function to invoke. For example, the value "someScope.SomeClass" will invoke the constructor someScope.SomeClass.

timeout
TimeSpan

The duration after which to cancel the async operation. Overrides default timeouts (DefaultAsyncTimeout).

args
Object[]

JSON-serializable arguments.

Returns

An IJSObjectReference instance that represents the created JS object.

Applies to