This class is a common base class for all data contracts. Properties flagged with the DataMemberAttribute can be converted from/to a dictionary.
More...
|
bool | IsValid [get] |
| Gets a value indicating whether all operation parameter are initialized. Call the GetErrorMessage method to get a detailed description for all missing parameters. More...
|
|
This class is a common base class for all data contracts. Properties flagged with the DataMemberAttribute can be converted from/to a dictionary.
◆ DataContract() [1/2]
Photon.SocketServer.Rpc.DataContract.DataContract |
( |
IRpcProtocol |
protocol, |
|
|
IDictionary< byte, object > |
dataMembers |
|
) |
| |
|
inlineprotected |
Initializes a new instance of the DataContract class. The params dictionary is mapped to properties flagged with the DataMemberAttribute. Check the IsValid property after creation to determine if all paramters have been initialized correctly.
- Parameters
-
protocol | There are some protcol specific types that need to be converted to other C# types, IRpcProtocol.TryConvertParameter is used for this purpose. |
dataMembers | A dictionary that contains the received parameters. |
◆ DataContract() [2/2]
Photon.SocketServer.Rpc.DataContract.DataContract |
( |
| ) |
|
|
inlineprotected |
◆ GetErrorMessage()
string Photon.SocketServer.Rpc.DataContract.GetErrorMessage |
( |
| ) |
|
|
inline |
Gets a message containing descriptive entries for each missing or invalid paramter.
- Returns
- A string containing descriptive entries for each missing or invalid paramter.
◆ ToDictionary()
Dictionary<byte, object> Photon.SocketServer.Rpc.DataContract.ToDictionary |
( |
| ) |
|
|
inline |
◆ errorMessage
string Photon.SocketServer.Rpc.DataContract.errorMessage |
|
protected |
◆ isValid
bool Photon.SocketServer.Rpc.DataContract.isValid |
|
protected |
◆ IsValid
bool Photon.SocketServer.Rpc.DataContract.IsValid |
|
get |
Gets a value indicating whether all operation parameter are initialized. Call the GetErrorMessage method to get a detailed description for all missing parameters.
true
if this instance is valid; otherwise, false
.