![]() |
ProtonNet Server 1.0
An Open Solution for all your socket or web api needs.
|
Defines methods for serializing and deserializing objects to and from binary data. More...
Public Member Functions | |
byte[] | Serialize< T > (T tObj) |
Serializes the specified object to a byte array. | |
void | Serialize< T > (System.IO.Stream stream, T tObj) |
Serializes the specified object and writes the binary data to a stream. | |
T | Deserialize< T > (System.IO.Stream stream) |
Deserializes an object of the specified type from a stream. | |
T | Deserialize< T > (byte[] data) |
Deserializes an object of the specified type from a byte array. | |
bool | TryParse< T > (System.IO.Stream stream, out T tValue) |
Tries to parse and deserialize an object of the specified type from a stream. | |
bool | TryParse< T > (byte[] data, out T tValue) |
Tries to parse and deserialize an object of the specified type from a byte array. | |
Defines methods for serializing and deserializing objects to and from binary data.
T XmobiTea.Binary.IBinaryConverter.Deserialize< T > | ( | byte[] | data | ) |
Deserializes an object of the specified type from a byte array.
T | The type of the object to deserialize. |
data | The byte array containing the serialized object. |
Implemented in XmobiTea.Binary.MessagePack.BinaryConverter, and XmobiTea.Binary.SimplePack.BinaryConverter.
T XmobiTea.Binary.IBinaryConverter.Deserialize< T > | ( | System.IO.Stream | stream | ) |
Deserializes an object of the specified type from a stream.
T | The type of the object to deserialize. |
stream | The stream from which the object is deserialized. |
Implemented in XmobiTea.Binary.MessagePack.BinaryConverter.
void XmobiTea.Binary.IBinaryConverter.Serialize< T > | ( | System.IO.Stream | stream, |
T | tObj ) |
Serializes the specified object and writes the binary data to a stream.
T | The type of the object to serialize. |
stream | The stream to which the binary data is written. |
tObj | The object to serialize. |
Implemented in XmobiTea.Binary.MessagePack.BinaryConverter.
byte[] XmobiTea.Binary.IBinaryConverter.Serialize< T > | ( | T | tObj | ) |
Serializes the specified object to a byte array.
T | The type of the object to serialize. |
tObj | The object to serialize. |
Implemented in XmobiTea.Binary.MessagePack.BinaryConverter, and XmobiTea.Binary.SimplePack.BinaryConverter.
bool XmobiTea.Binary.IBinaryConverter.TryParse< T > | ( | byte[] | data, |
out T | tValue ) |
Tries to parse and deserialize an object of the specified type from a byte array.
T | The type of the object to deserialize. |
data | The byte array containing the serialized object. |
tValue | When this method returns, contains the deserialized object of type T if the parsing succeeded, or the default value of T if the parsing failed. |
true
if the parsing succeeded; otherwise, false
.Implemented in XmobiTea.Binary.MessagePack.BinaryConverter, and XmobiTea.Binary.SimplePack.BinaryConverter.
bool XmobiTea.Binary.IBinaryConverter.TryParse< T > | ( | System.IO.Stream | stream, |
out T | tValue ) |
Tries to parse and deserialize an object of the specified type from a stream.
T | The type of the object to deserialize. |
stream | The stream from which the object is deserialized. |
tValue | When this method returns, contains the deserialized object of type T if the parsing succeeded, or the default value of T if the parsing failed. |
true
if the parsing succeeded; otherwise, false
.Implemented in XmobiTea.Binary.MessagePack.BinaryConverter.