Incoming OperationRequests are often answered with a response (represented by this class). It can be sent to the client by using the PeerBase.SendOperationResponse method. The IRpcProtocol.SerializeOperationResponse method serializes OperationResponse instances. SetParameters(object) converts properties that are flagged with DataMemberAttribute into the Parameters dictionary.
More...
|
string | DebugMessage [get, set] |
| Gets or sets the debug message. Error code 0 returns typically debug message "Ok". More...
|
|
byte | OperationCode [get, set] |
| Gets or sets the operation code. It allows the client to identify which operation was answered. More...
|
|
Dictionary< byte, object > | Parameters [get, set] |
| Gets or sets the response parameters. More...
|
|
object | this[byte parameterKey] [get, set] |
| Gets or sets the parameter associated with the specified key. More...
|
|
short | ReturnCode [get, set] |
| Gets or sets the error code. Code 0 means OK. More...
|
|
Incoming OperationRequests are often answered with a response (represented by this class). It can be sent to the client by using the PeerBase.SendOperationResponse method. The IRpcProtocol.SerializeOperationResponse method serializes OperationResponse instances. SetParameters(object) converts properties that are flagged with DataMemberAttribute into the Parameters dictionary.
◆ OperationResponse() [1/4]
Photon.SocketServer.OperationResponse.OperationResponse |
( |
| ) |
|
|
inline |
◆ OperationResponse() [2/4]
Photon.SocketServer.OperationResponse.OperationResponse |
( |
byte |
operationCode | ) |
|
|
inline |
◆ OperationResponse() [3/4]
Photon.SocketServer.OperationResponse.OperationResponse |
( |
byte |
operationCode, |
|
|
object |
dataContract |
|
) |
| |
|
inline |
◆ OperationResponse() [4/4]
Photon.SocketServer.OperationResponse.OperationResponse |
( |
byte |
operationCode, |
|
|
Dictionary< byte, object > |
parameters |
|
) |
| |
|
inline |
◆ SetParameters() [1/2]
void Photon.SocketServer.OperationResponse.SetParameters |
( |
Dictionary< byte, object > |
parameters | ) |
|
|
inline |
Replaces the Parameters with parameters .
- Parameters
-
parameters | The parameters to set. |
◆ SetParameters() [2/2]
void Photon.SocketServer.OperationResponse.SetParameters |
( |
object |
dataContract | ) |
|
|
inline |
Converts properties of an object to response Parameters. Included properties require the DataMemberAttribute.
- Parameters
-
dataContract | Properties of this object with the the DataMemberAttribute converted to Parameters. |
◆ DebugMessage
string Photon.SocketServer.OperationResponse.DebugMessage |
|
getset |
Gets or sets the debug message. Error code 0 returns typically debug message "Ok".
◆ OperationCode
byte Photon.SocketServer.OperationResponse.OperationCode |
|
getset |
Gets or sets the operation code. It allows the client to identify which operation was answered.
◆ Parameters
Dictionary<byte, object> Photon.SocketServer.OperationResponse.Parameters |
|
getset |
Gets or sets the response parameters.
◆ ReturnCode
short Photon.SocketServer.OperationResponse.ReturnCode |
|
getset |
Gets or sets the error code. Code 0 means OK.
◆ this[byte parameterKey]
object Photon.SocketServer.OperationResponse.this[byte parameterKey] |
|
getset |
Gets or sets the parameter associated with the specified key.
- Parameters
-
parameterKey | The key of the parameter to get or set. |
- Returns
- The parameter associated with the specified key. If the specified key is not found, a get operation throws a KeyNotFoundException, and a set operation creates a new parameter with the specified key.
- Exceptions
-
System.NullReferenceException | The Parameters property has not been initialized. |