JsonRpc.NotifyAsync Método

Definición

Sobrecargas

Nombre Description
NotifyAsync(String, Object)

Invoca un método determinado en un servidor JSON-RPC sin esperar su respuesta.

NotifyAsync(String, Object[])

Invoque un método en el servidor y no espere a que finalice, se active y olvide el estilo.

NotifyAsync(String, Object[], IReadOnlyList<Type>)

Invoca un método determinado en un servidor JSON-RPC sin esperar su respuesta.

NotifyAsync(String, Object)

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

Invoca un método determinado en un servidor JSON-RPC sin esperar su respuesta.

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

Parámetros

targetName
String

Nombre del método que se va a invocar. No debe ser null ni estar vacío.

argument
Object

El argumento de método debe ser serializable mediante el IJsonRpcMessageFormatterseleccionado.

Devoluciones

Tarea que se completa cuando la solicitud de notificación se envía al canal al servidor.

Excepciones

Si targetName es null.

Se produce cuando targetName está vacío.

Si esta instancia de JsonRpc ya se ha eliminado antes de esta llamada.

Se produce cuando la conexión finaliza (por cualquier lado) mientras se transmite la solicitud.

Cualquier excepción producida por el IJsonRpcMessageFormatter (normalmente debido a errores de serialización). Al usar JsonMessageFormatter debe Newtonsoft.Json.JsonSerializationException. Al usar MessagePackFormatter debe MessagePack.MessagePackSerializationException.

Comentarios

Se omite cualquier error que se produzca en el lado servidor.

Se aplica a

NotifyAsync(String, Object[])

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

Invoque un método en el servidor y no espere a que finalice, se active y olvide el estilo.

public System.Threading.Tasks.Task NotifyAsync(string targetName, params object[] arguments);
public System.Threading.Tasks.Task NotifyAsync(string targetName, params object?[]? arguments);
member this.NotifyAsync : string * obj[] -> System.Threading.Tasks.Task
Public Function NotifyAsync (targetName As String, ParamArray arguments As Object()) As Task

Parámetros

targetName
String

Nombre del método que se va a invocar en el servidor. No debe ser null ni una cadena vacía.

arguments
Object[]

Los argumentos del método deben ser serializables en JSON.

Devoluciones

Tarea que se completa cuando la solicitud de notificación se envía al canal al servidor.

Excepciones

Si targetName es null.

Si se ha eliminado esta instancia de JsonRpc.

Comentarios

Se omite cualquier error que se produzca en el lado servidor.

Se aplica a

NotifyAsync(String, Object[], IReadOnlyList<Type>)

Invoca un método determinado en un servidor JSON-RPC sin esperar su respuesta.

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

Parámetros

targetName
String

Nombre del método que se va a invocar. No debe ser null ni estar vacío.

arguments
Object[]

Argumentos que se van a pasar al método invocado. Deben ser serializables mediante el IJsonRpcMessageFormatterseleccionado. Si null, no se pasan argumentos.

argumentDeclaredTypes
IReadOnlyList<Type>

Lista de Type objetos que describen cómo se espera que el servidor escriba cada elemento de arguments. Si se especifica, debe tener exactamente la misma longitud que arguments y no contener elementos null. Este valor se omite cuando isParameterObject es true.

Devoluciones

Tarea que se completa cuando la solicitud de notificación se envía al canal al servidor.

Comentarios

Se omite cualquier error que se produzca en el lado servidor.

Se aplica a