Share via


JsonRpc.NotifyWithParameterObjectAsync Method

Definition

Overloads

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

Invokes a given method on a JSON-RPC server without waiting for its response.

NotifyWithParameterObjectAsync(String, Object)

Invoke a method on the server and don't wait for its completion, fire-and-forget style. The parameter is passed as an object.

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

Invokes a given method on a JSON-RPC server without waiting for its response.

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

Parameters

targetName
String

Name of the method to invoke. Must not be null or empty.

argument
Object

An object whose properties match the names of parameters on the target method. Must be serializable using the selected IJsonRpcMessageFormatter.

argumentDeclaredTypes
IReadOnlyDictionary<String,Type>

A dictionary of Type objects that describe how each entry in the IReadOnlyDictionary<TKey,TValue> provided in the only element of arguments is expected by the server to be typed. If specified, this must have exactly the same set of keys as the dictionary contained in the first element of arguments, and contain no null values.

Returns

A task that completes when the notification has been transmitted.

Remarks

Any error that happens on the server side is ignored.

Applies to

NotifyWithParameterObjectAsync(String, Object)

Invoke a method on the server and don't wait for its completion, fire-and-forget style. The parameter is passed as an 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

Parameters

targetName
String

The name of the method to invoke on the server. Must not be null or empty string.

argument
Object

Method argument, must be serializable to JSON.

Returns

A task that completes when the notify request is sent to the channel to the server.

Exceptions

If targetName is null.

If this instance of JsonRpc has been disposed.

Remarks

Any error that happens on the server side is ignored.

Applies to