JSRuntimeExtensions.InvokeAsync Método

Definición

Sobrecargas

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

Invoca la función de JavaScript especificada de forma asincrónica.

JSRuntime aplicará tiempos de espera a esta operación en función del valor configurado en DefaultAsyncTimeout. Para enviar una llamada con un tiempo de espera diferente o sin tiempo de espera, considere la posibilidad de usar InvokeAsync<TValue>(String, CancellationToken, Object[]).

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

Invoca la función de JavaScript especificada de forma asincrónica.

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

Invoca la función de JavaScript especificada de forma asincrónica.

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

Invoca la función de JavaScript especificada de forma asincrónica.

JSRuntime aplicará tiempos de espera a esta operación en función del valor configurado en DefaultAsyncTimeout. Para enviar una llamada con un tiempo de espera diferente o sin tiempo de espera, considere la posibilidad de 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

Tipo de valor devuelto serializable por JSON.

Parámetros

jsRuntime
IJSRuntime

IJSRuntime.

identifier
String

Identificador de la función que se va a invocar. Por ejemplo, el valor "someScope.someFunction" invocará la función window.someScope.someFunction.

args
Object[]

Argumentos serializables json.

Devoluciones

ValueTask<TValue>

Instancia de TValue obtenida por JSON deserializando el valor devuelto.

Se aplica a

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

Invoca la función de JavaScript especificada de forma asincrónica.

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

Tipo de valor devuelto serializable por JSON.

Parámetros

jsRuntime
IJSRuntime

IJSRuntime.

identifier
String

Identificador de la función que se va a invocar. Por ejemplo, el valor "someScope.someFunction" invocará la función window.someScope.someFunction.

cancellationToken
CancellationToken

Token de cancelación para indicar la cancelación de la operación. Al especificar este parámetro, se invalidarán las cancelaciones predeterminadas, como debido a los tiempos de espera (DefaultAsyncTimeout) que se apliquen.

args
Object[]

Argumentos serializables json.

Devoluciones

ValueTask<TValue>

Instancia de TValue obtenida por JSON deserializando el valor devuelto.

Se aplica a

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

Invoca la función de JavaScript especificada de forma asincrónica.

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

IJSRuntime.

identifier
String

Identificador de la función que se va a invocar. Por ejemplo, el valor "someScope.someFunction" invocará la función window.someScope.someFunction.

timeout
TimeSpan

Duración después de la cual se cancela la operación asincrónica. Invalida los tiempos de espera predeterminados (DefaultAsyncTimeout).

args
Object[]

Argumentos serializables json.

Devoluciones

ValueTask<TValue>

que ValueTask representa la operación de invocación asincrónica.

Se aplica a