JSRuntimeExtensions.InvokeAsync Método

Definição

Sobrecargas

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

Invoca a função JavaScript especificada de forma assíncrona.

JSRuntime aplicará tempos limite a essa operação com base no valor configurado em DefaultAsyncTimeout. Para expedir uma chamada com um tempo limite diferente ou sem tempo limite, considere usar InvokeAsync<TValue>(String, CancellationToken, Object[]).

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

Invoca a função JavaScript especificada de forma assíncrona.

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

Invoca a função JavaScript especificada de forma assíncrona.

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

Invoca a função JavaScript especificada de forma assíncrona.

JSRuntime aplicará tempos limite a essa operação com base no valor configurado em DefaultAsyncTimeout. Para expedir uma chamada com um tempo limite diferente ou sem tempo limite, considere usar 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)

Parâmetros de tipo

TValue

O tipo de retorno serializável JSON.

Parâmetros

jsRuntime
IJSRuntime

O IJSRuntime.

identifier
String

Um identificador para a função a ser invocada. Por exemplo, o valor "someScope.someFunction" invocará a função window.someScope.someFunction.

args
Object[]

Argumentos serializáveis em JSON.

Retornos

ValueTask<TValue>

Uma instância de TValue obtida por JSON desserializando o valor retornado.

Aplica-se a

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

Invoca a função JavaScript especificada de forma assíncrona.

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)

Parâmetros de tipo

TValue

O tipo de retorno serializável JSON.

Parâmetros

jsRuntime
IJSRuntime

O IJSRuntime.

identifier
String

Um identificador para a função a ser invocada. Por exemplo, o valor "someScope.someFunction" invocará a função window.someScope.someFunction.

cancellationToken
CancellationToken

Um token de cancelamento para sinalizar o cancelamento da operação. Especificar esse parâmetro substituirá todos os cancelamentos padrão, como devido a tempos limite (DefaultAsyncTimeout) de serem aplicados.

args
Object[]

Argumentos serializáveis em JSON.

Retornos

ValueTask<TValue>

Uma instância de TValue obtida por JSON desserializando o valor retornado.

Aplica-se a

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

Invoca a função JavaScript especificada de forma assíncrona.

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)

Parâmetros de tipo

TValue

Parâmetros

jsRuntime
IJSRuntime

O IJSRuntime.

identifier
String

Um identificador para a função a ser invocada. Por exemplo, o valor "someScope.someFunction" invocará a função window.someScope.someFunction.

timeout
TimeSpan

A duração após a qual cancelar a operação assíncrona. Substitui tempos limite padrão (DefaultAsyncTimeout).

args
Object[]

Argumentos serializáveis em JSON.

Retornos

ValueTask<TValue>

Um ValueTask que representa a operação de invocação assíncrona.

Aplica-se a