語言

JsonRpc.NotifyWithParameterObjectAsync 方法

定義

多載

名稱 Description
NotifyWithParameterObjectAsync(String, Object)

在伺服器上叫用方法,不要等待其完成、引發和忘記樣式。 參數會當做 對象傳遞。

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

在 JSON-RPC 伺服器上叫用指定的方法,而不需等候其回應。

NotifyWithParameterObjectAsync(String, Object)

來源:
JsonRpc.cs
來源:
JsonRpc.cs
來源:
JsonRpc.cs
來源:
JsonRpc.cs
來源:
JsonRpc.cs
來源:
JsonRpc.cs
來源:
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 值。

傳回

傳送通知時完成的工作。

備註

忽略伺服器端發生的任何錯誤。

適用於