JSObjectReferenceExtensions.InvokeVoidAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
InvokeVoidAsync(IJSObjectReference, String, Object[]) |
异步调用指定的 JavaScript 函数。 |
InvokeVoidAsync(IJSObjectReference, String, CancellationToken, Object[]) |
异步调用指定的 JavaScript 函数。 |
InvokeVoidAsync(IJSObjectReference, String, TimeSpan, Object[]) |
异步调用指定的 JavaScript 函数。 |
InvokeVoidAsync(IJSObjectReference, String, Object[])
异步调用指定的 JavaScript 函数。
public:
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::ValueTask InvokeVoidAsync(Microsoft::JSInterop::IJSObjectReference ^ jsObjectReference, System::String ^ identifier, ... cli::array <System::Object ^> ^ args);
public static System.Threading.Tasks.ValueTask InvokeVoidAsync (this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, params object?[] args);
public static System.Threading.Tasks.ValueTask InvokeVoidAsync (this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, params object?[]? args);
static member InvokeVoidAsync : Microsoft.JSInterop.IJSObjectReference * string * obj[] -> System.Threading.Tasks.ValueTask
<Extension()>
Public Function InvokeVoidAsync (jsObjectReference As IJSObjectReference, identifier As String, ParamArray args As Object()) As ValueTask
参数
- jsObjectReference
- IJSObjectReference
- identifier
- String
要调用的函数的标识符。 例如, 值 "someScope.someFunction"
将调用目标实例上的 函数 someScope.someFunction
。
- args
- Object[]
JSON 可序列化参数。
返回
表示 ValueTask 异步调用操作的 。
适用于
InvokeVoidAsync(IJSObjectReference, String, CancellationToken, Object[])
异步调用指定的 JavaScript 函数。
public:
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::ValueTask InvokeVoidAsync(Microsoft::JSInterop::IJSObjectReference ^ jsObjectReference, System::String ^ identifier, System::Threading::CancellationToken cancellationToken, ... cli::array <System::Object ^> ^ args);
public static System.Threading.Tasks.ValueTask InvokeVoidAsync (this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, System.Threading.CancellationToken cancellationToken, params object?[] args);
public static System.Threading.Tasks.ValueTask InvokeVoidAsync (this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, System.Threading.CancellationToken cancellationToken, params object?[]? args);
static member InvokeVoidAsync : Microsoft.JSInterop.IJSObjectReference * string * System.Threading.CancellationToken * obj[] -> System.Threading.Tasks.ValueTask
<Extension()>
Public Function InvokeVoidAsync (jsObjectReference As IJSObjectReference, identifier As String, cancellationToken As CancellationToken, ParamArray args As Object()) As ValueTask
参数
- jsObjectReference
- IJSObjectReference
- identifier
- String
要调用的函数的标识符。 例如, 值 "someScope.someFunction"
将调用目标实例上的 函数 someScope.someFunction
。
- cancellationToken
- CancellationToken
用于指示取消操作的取消标记。 指定此参数将替代任何默认取消,例如由于应用超时 (DefaultAsyncTimeout) 。
- args
- Object[]
JSON 可序列化参数。
返回
表示 ValueTask 异步调用操作的 。
适用于
InvokeVoidAsync(IJSObjectReference, String, TimeSpan, Object[])
异步调用指定的 JavaScript 函数。
public:
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::ValueTask InvokeVoidAsync(Microsoft::JSInterop::IJSObjectReference ^ jsObjectReference, System::String ^ identifier, TimeSpan timeout, ... cli::array <System::Object ^> ^ args);
public static System.Threading.Tasks.ValueTask InvokeVoidAsync (this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, TimeSpan timeout, params object?[] args);
public static System.Threading.Tasks.ValueTask InvokeVoidAsync (this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, TimeSpan timeout, params object?[]? args);
static member InvokeVoidAsync : Microsoft.JSInterop.IJSObjectReference * string * TimeSpan * obj[] -> System.Threading.Tasks.ValueTask
<Extension()>
Public Function InvokeVoidAsync (jsObjectReference As IJSObjectReference, identifier As String, timeout As TimeSpan, ParamArray args As Object()) As ValueTask
参数
- jsObjectReference
- IJSObjectReference
- identifier
- String
要调用的函数的标识符。 例如, 值 "someScope.someFunction"
将调用目标实例上的 函数 someScope.someFunction
。
- timeout
- TimeSpan
取消异步操作的持续时间。 替代) (DefaultAsyncTimeout 默认超时。
- args
- Object[]
JSON 可序列化参数。
返回
表示 ValueTask 异步调用操作的 。