Class GroupCommand
Used to serialize a group command.
Namespace: Neon.SignalR
Assembly: Neon.SignalR.dll
Syntax
[MessagePackObject(false)]
public class GroupCommand
Properties
Action
The action to be performed on the group.
Declaration
[Key(2)]
public GroupAction Action { get; set; }
Property Value
Type | Description |
---|---|
GroupAction |
ConnectionId
Gets the ID of the connection to be added or removed from the group.
Declaration
[Key(4)]
public string ConnectionId { get; set; }
Property Value
Type | Description |
---|---|
string |
GroupName
Gets the group on which the action is performed.
Declaration
[Key(3)]
public string GroupName { get; set; }
Property Value
Type | Description |
---|---|
string |
Id
The ID of the group command.
Declaration
[Key(0)]
public int Id { get; set; }
Property Value
Type | Description |
---|---|
int |
ServerName
The name of the server that sent the command.
Declaration
[Key(1)]
public string ServerName { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
Read(byte[])
Reads an GroupCommand from a byte array.
Declaration
public static GroupCommand Read(byte[] message)
Parameters
Type | Name | Description |
---|---|---|
byte[] | message | The message bytes. |
Returns
Type | Description |
---|---|
GroupCommand | The parsed GroupCommand. |
Write(int, string, GroupAction, string, string)
Writes a GroupCommand to a byte array.
Declaration
public static byte[] Write(int id, string serverName, GroupAction action, string groupName, string connectionId)
Parameters
Type | Name | Description |
---|---|---|
int | id | The message ID. |
string | serverName | The target server. |
GroupAction | action | The action. |
string | groupName | The group name. |
string | connectionId | The connection ID. |
Returns
Type | Description |
---|---|
byte[] |