JsonRpc.NotifyWithParameterObjectAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
NotifyWithParameterObjectAsync(String, Object, IReadOnlyDictionary<String,Type>) |
在 JSON-RPC 服务器上调用给定的方法,而无需等待其响应。 |
NotifyWithParameterObjectAsync(String, Object) |
在服务器上调用方法,不要等待其完成、触发和忘记样式。 参数作为对象传递。 |
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对象字典,描述服务器预期在唯一元素arguments
中IReadOnlyDictionary<TKey,TValue>提供的每个条目如何键入。
如果指定,则必须具有与第一个元素 arguments
中包含的字典完全相同的键集,并且不包含 null
任何值。
返回
在传输通知时完成的任务。
注解
忽略服务器端发生的任何错误。
适用于
NotifyWithParameterObjectAsync(String, Object)
在服务器上调用方法,不要等待其完成、触发和忘记样式。 参数作为对象传递。
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 。
注解
忽略服务器端发生的任何错误。