语言

JsonRpc.NotifyWithParameterObjectAsync 方法

定义

重载

名称 说明
NotifyWithParameterObjectAsync(String, Object)

在服务器上调用一个方法,不要等待其完成、触发和忘记样式。 参数作为对象传递。

NotifyWithParameterObjectAsync(String, Object, IReadOnlyDictionary<String,Type>)

在 JSON-RPC 服务器上调用给定的方法,而无需等待其响应。

NotifyWithParameterObjectAsync(String, Object)

Source:
JsonRpc.cs
Source:
JsonRpc.cs
Source:
JsonRpc.cs
Source:
JsonRpc.cs
Source:
JsonRpc.cs
Source:
JsonRpc.cs
Source:
JsonRpc.cs

在服务器上调用一个方法,不要等待其完成、触发和忘记样式。 参数作为对象传递。

public System.Threading.Tasks.Task NotifyWithParameterObjectAsync(string targetName, object argument = default);
public System.Threading.Tasks.Task NotifyWithParameterObjectAsync(string targetName, object? argument = default);
member this.NotifyWithParameterObjectAsync : string * obj -> System.Threading.Tasks.Task
Public Function NotifyWithParameterObjectAsync (targetName As String, Optional argument As Object = Nothing) As Task

参数

targetName
String

在服务器上调用的方法的名称。 不得为 null 或空字符串。

argument
Object

方法参数必须可序列化为 JSON。

返回

将通知请求发送到服务器时完成的任务。

例外

如果 targetName 为 null。

如果已释放此 JsonRpc 实例。

注解

将忽略服务器端发生的任何错误。

适用于

NotifyWithParameterObjectAsync(String, Object, IReadOnlyDictionary<String,Type>)

在 JSON-RPC 服务器上调用给定的方法,而无需等待其响应。

public System.Threading.Tasks.Task NotifyWithParameterObjectAsync(string targetName, object? argument, System.Collections.Generic.IReadOnlyDictionary<string,Type>? argumentDeclaredTypes);
member this.NotifyWithParameterObjectAsync : string * obj * System.Collections.Generic.IReadOnlyDictionary<string, Type> -> System.Threading.Tasks.Task
Public Function NotifyWithParameterObjectAsync (targetName As String, argument As Object, argumentDeclaredTypes As IReadOnlyDictionary(Of String, Type)) As Task

参数

targetName
String

要调用的方法的名称。 不得为 null 或为空。

argument
Object

一个对象,其属性与目标方法上的参数名称匹配。 必须使用所选 IJsonRpcMessageFormatter进行序列化。

argumentDeclaredTypes
IReadOnlyDictionary<String,Type>

描述 Type 中 IReadOnlyDictionary<TKey,TValue> 元素中每个条目应由服务器键入的方式的 arguments 对象的字典。 如果指定,则必须具有与 arguments第一个元素中包含的字典完全相同的键集,并且不包含 null 值。

返回

在传输通知时完成的任务。

注解

将忽略服务器端发生的任何错误。

适用于