Class Invocation
Represents a method invokation.
Namespace: Neon.SignalR
Assembly: Neon.SignalR.dll
Syntax
[MessagePackObject(false)]
public class Invocation
Properties
Args
The method arguments.
Declaration
[Key(2)]
public object[] Args { get; set; }
Property Value
| Type | Description |
|---|---|
| object[] |
ExcludedConnectionIds
The list of connection IDs that should not receive this message.
Declaration
[Key(3)]
public IReadOnlyList<string> ExcludedConnectionIds { get; set; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
InvocationId
The optional invokation ID.
Declaration
[Key(0)]
public string InvocationId { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
MethodName
The method name.
Declaration
[Key(1)]
public string MethodName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ReturnChannel
The optional return channel.
Declaration
[Key(5)]
public string ReturnChannel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Read(byte[])
Reads an Invocation from a byte array.
Declaration
public static Invocation Read(byte[] message)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | message | The message bytes. |
Returns
| Type | Description |
|---|---|
| Invocation | The parsed Invocation. |
Write(string, object[])
Writes a Invocation to a byte array.
Declaration
public static byte[] Write(string methodName, object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | methodName | |
| object[] | args |
Returns
| Type | Description |
|---|---|
| byte[] |
Write(string, object[], string, IReadOnlyList<string>, string)
Writes a Invocation to a byte array.
Declaration
public static byte[] Write(string methodName, object[] args, string invocationId = null, IReadOnlyList<string> excludedConnectionIds = null, string returnChannel = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | methodName | The method name. |
| object[] | args | The arguments. |
| string | invocationId | Optionally specifies an invocation ID. |
| IReadOnlyList<string> | excludedConnectionIds | Optionally specifies excluded connection IDs. |
| string | returnChannel | Optionally specifies the return channel. |
Returns
| Type | Description |
|---|---|
| byte[] | The serialized message. |