JSRuntimeExtensions.InvokeVoidAsync 方法

定义

重载

InvokeVoidAsync(IJSRuntime, String, Object[])

异步调用指定的 JavaScript 函数。

InvokeVoidAsync(IJSRuntime, String, CancellationToken, Object[])

异步调用指定的 JavaScript 函数。

InvokeVoidAsync(IJSRuntime, String, TimeSpan, Object[])

异步调用指定的 JavaScript 函数。

InvokeVoidAsync(IJSRuntime, String, Object[])

异步调用指定的 JavaScript 函数。

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

参数

jsRuntime
IJSRuntime

IJSRuntime

identifier
String

要调用的函数的标识符。 例如, 值 "someScope.someFunction" 将调用函数 window.someScope.someFunction

args
Object[]

JSON 可序列化参数。

返回

表示 ValueTask 异步调用操作的 。

适用于

InvokeVoidAsync(IJSRuntime, String, CancellationToken, Object[])

异步调用指定的 JavaScript 函数。

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

参数

jsRuntime
IJSRuntime

IJSRuntime

identifier
String

要调用的函数的标识符。 例如, 值 "someScope.someFunction" 将调用函数 window.someScope.someFunction

cancellationToken
CancellationToken

用于指示取消操作的取消标记。 指定此参数将替代任何默认取消,例如由于应用超时 (DefaultAsyncTimeout) 。

args
Object[]

JSON 可序列化参数。

返回

表示 ValueTask 异步调用操作的 。

适用于

InvokeVoidAsync(IJSRuntime, String, TimeSpan, Object[])

异步调用指定的 JavaScript 函数。

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

参数

jsRuntime
IJSRuntime

IJSRuntime

identifier
String

要调用的函数的标识符。 例如, 值 "someScope.someFunction" 将调用函数 window.someScope.someFunction

timeout
TimeSpan

取消异步操作的持续时间。 替代) (DefaultAsyncTimeout 默认超时。

args
Object[]

JSON 可序列化参数。

返回

表示 ValueTask 异步调用操作的 。

适用于