JSRuntimeExtensions.InvokeAsync Méthode

Définition

Surcharges

InvokeAsync<TValue>(IJSRuntime, String, Object[])

Appelle la fonction JavaScript spécifiée de manière asynchrone.

JSRuntime applique des délais d’expiration à cette opération en fonction de la valeur configurée dans DefaultAsyncTimeout. Pour distribuer un appel avec un délai d’expiration différent, ou sans délai d’expiration, envisagez d’utiliser InvokeAsync<TValue>(String, CancellationToken, Object[]).

InvokeAsync<TValue>(IJSRuntime, String, CancellationToken, Object[])

Appelle la fonction JavaScript spécifiée de manière asynchrone.

InvokeAsync<TValue>(IJSRuntime, String, TimeSpan, Object[])

Appelle la fonction JavaScript spécifiée de manière asynchrone.

InvokeAsync<TValue>(IJSRuntime, String, Object[])

Appelle la fonction JavaScript spécifiée de manière asynchrone.

JSRuntime applique des délais d’expiration à cette opération en fonction de la valeur configurée dans DefaultAsyncTimeout. Pour distribuer un appel avec un délai d’expiration différent, ou sans délai d’expiration, envisagez d’utiliser InvokeAsync<TValue>(String, CancellationToken, Object[]).

public:
generic <typename TValue>
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::ValueTask<TValue> InvokeAsync(Microsoft::JSInterop::IJSRuntime ^ jsRuntime, System::String ^ identifier, ... cli::array <System::Object ^> ^ args);
public static System.Threading.Tasks.ValueTask<TValue> InvokeAsync<TValue> (this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, params object[] args);
public static System.Threading.Tasks.ValueTask<TValue> InvokeAsync<TValue> (this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, params object?[]? args);
static member InvokeAsync : Microsoft.JSInterop.IJSRuntime * string * obj[] -> System.Threading.Tasks.ValueTask<'Value>
<Extension()>
Public Function InvokeAsync(Of TValue) (jsRuntime As IJSRuntime, identifier As String, ParamArray args As Object()) As ValueTask(Of TValue)

Paramètres de type

TValue

Type de retour sérialisable JSON.

Paramètres

jsRuntime
IJSRuntime

L’IJSRuntimeopérateur

identifier
String

Identificateur de la fonction à appeler. Par exemple, la valeur "someScope.someFunction" appelle la fonction window.someScope.someFunction.

args
Object[]

Arguments sérialisables JSON.

Retours

ValueTask<TValue>

Une instance de TValue obtenue par désérialisation JSON de la valeur de retour.

S’applique à

InvokeAsync<TValue>(IJSRuntime, String, CancellationToken, Object[])

Appelle la fonction JavaScript spécifiée de manière asynchrone.

public:
generic <typename TValue>
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::ValueTask<TValue> InvokeAsync(Microsoft::JSInterop::IJSRuntime ^ jsRuntime, System::String ^ identifier, System::Threading::CancellationToken cancellationToken, ... cli::array <System::Object ^> ^ args);
public static System.Threading.Tasks.ValueTask<TValue> InvokeAsync<TValue> (this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, System.Threading.CancellationToken cancellationToken, params object[] args);
public static System.Threading.Tasks.ValueTask<TValue> InvokeAsync<TValue> (this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, System.Threading.CancellationToken cancellationToken, params object?[]? args);
static member InvokeAsync : Microsoft.JSInterop.IJSRuntime * string * System.Threading.CancellationToken * obj[] -> System.Threading.Tasks.ValueTask<'Value>
<Extension()>
Public Function InvokeAsync(Of TValue) (jsRuntime As IJSRuntime, identifier As String, cancellationToken As CancellationToken, ParamArray args As Object()) As ValueTask(Of TValue)

Paramètres de type

TValue

Type de retour sérialisable JSON.

Paramètres

jsRuntime
IJSRuntime

L’IJSRuntimeopérateur

identifier
String

Identificateur de la fonction à appeler. Par exemple, la valeur "someScope.someFunction" appelle la fonction window.someScope.someFunction.

cancellationToken
CancellationToken

Jeton d’annulation pour signaler l’annulation de l’opération. La spécification de ce paramètre remplace toutes les annulations par défaut, par exemple en raison de délais d’attente (DefaultAsyncTimeout) d’application.

args
Object[]

Arguments sérialisables JSON.

Retours

ValueTask<TValue>

Une instance de TValue obtenue par désérialisation JSON de la valeur de retour.

S’applique à

InvokeAsync<TValue>(IJSRuntime, String, TimeSpan, Object[])

Appelle la fonction JavaScript spécifiée de manière asynchrone.

public:
generic <typename TValue>
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::ValueTask<TValue> InvokeAsync(Microsoft::JSInterop::IJSRuntime ^ jsRuntime, System::String ^ identifier, TimeSpan timeout, ... cli::array <System::Object ^> ^ args);
public static System.Threading.Tasks.ValueTask<TValue> InvokeAsync<TValue> (this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, TimeSpan timeout, params object[] args);
public static System.Threading.Tasks.ValueTask<TValue> InvokeAsync<TValue> (this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, TimeSpan timeout, params object?[]? args);
static member InvokeAsync : Microsoft.JSInterop.IJSRuntime * string * TimeSpan * obj[] -> System.Threading.Tasks.ValueTask<'Value>
<Extension()>
Public Function InvokeAsync(Of TValue) (jsRuntime As IJSRuntime, identifier As String, timeout As TimeSpan, ParamArray args As Object()) As ValueTask(Of TValue)

Paramètres de type

TValue

Paramètres

jsRuntime
IJSRuntime

L’IJSRuntimeopérateur

identifier
String

Identificateur de la fonction à appeler. Par exemple, la valeur "someScope.someFunction" appelle la fonction window.someScope.someFunction.

timeout
TimeSpan

Durée après laquelle annuler l’opération asynchrone. Remplace les délais d’expiration par défaut (DefaultAsyncTimeout).

args
Object[]

Arguments sérialisables JSON.

Retours

ValueTask<TValue>

ValueTask qui représente l’opération d’appel asynchrone.

S’applique à