Provides methods for serializing and deserializing objects using MessagePack.
More...
|
| BinaryConverter () |
| Initializes a new instance of the BinaryConverter class.
|
|
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 the provided stream.
|
|
T | Deserialize< T > (System.IO.Stream stream) |
| Deserializes data from the provided stream into an object of type T .
|
|
T | Deserialize< T > (byte[] data) |
| Deserializes the specified byte array into an object of type T .
|
|
bool | TryParse< T > (System.IO.Stream stream, out T tValue) |
| Tries to deserialize data from the provided stream into an object of type T .
|
|
bool | TryParse< T > (byte[] data, out T tValue) |
| Tries to deserialize the specified byte array into an object of type T .
|
|
Provides methods for serializing and deserializing objects using MessagePack.
◆ Deserialize< T >() [1/2]
T XmobiTea.Binary.MessagePack.BinaryConverter.Deserialize< T > |
( |
byte[] | data | ) |
|
Deserializes the specified byte array into an object of type T .
- Template Parameters
-
T | The type of the object to deserialize. |
- Parameters
-
data | The byte array containing the binary data. |
- Returns
- The deserialized object.
Implements XmobiTea.Binary.IBinaryConverter.
◆ Deserialize< T >() [2/2]
T XmobiTea.Binary.MessagePack.BinaryConverter.Deserialize< T > |
( |
System.IO.Stream | stream | ) |
|
Deserializes data from the provided stream into an object of type T .
- Template Parameters
-
T | The type of the object to deserialize. |
- Parameters
-
stream | The stream containing the binary data. |
- Returns
- The deserialized object.
Implements XmobiTea.Binary.IBinaryConverter.
◆ Serialize< T >() [1/2]
void XmobiTea.Binary.MessagePack.BinaryConverter.Serialize< T > |
( |
System.IO.Stream | stream, |
|
|
T | tObj ) |
Serializes the specified object and writes the binary data to the provided stream.
- Template Parameters
-
T | The type of the object to serialize. |
- Parameters
-
stream | The stream to write the serialized data to. |
tObj | The object to serialize. |
Implements XmobiTea.Binary.IBinaryConverter.
◆ Serialize< T >() [2/2]
byte[] XmobiTea.Binary.MessagePack.BinaryConverter.Serialize< T > |
( |
T | tObj | ) |
|
Serializes the specified object to a byte array.
- Template Parameters
-
T | The type of the object to serialize. |
- Parameters
-
tObj | The object to serialize. |
- Returns
- A byte array containing the serialized data.
Implements XmobiTea.Binary.IBinaryConverter.
◆ TryParse< T >() [1/2]
bool XmobiTea.Binary.MessagePack.BinaryConverter.TryParse< T > |
( |
byte[] | data, |
|
|
out T | tValue ) |
Tries to deserialize the specified byte array into an object of type T .
- Template Parameters
-
T | The type of the object to deserialize. |
- Parameters
-
data | The byte array containing the binary data. |
tValue | When this method returns, contains the deserialized object. |
- Returns
true
if the deserialization succeeded; otherwise, false
.
Implements XmobiTea.Binary.IBinaryConverter.
◆ TryParse< T >() [2/2]
bool XmobiTea.Binary.MessagePack.BinaryConverter.TryParse< T > |
( |
System.IO.Stream | stream, |
|
|
out T | tValue ) |
Tries to deserialize data from the provided stream into an object of type T .
- Template Parameters
-
T | The type of the object to deserialize. |
- Parameters
-
stream | The stream containing the binary data. |
tValue | When this method returns, contains the deserialized object. |
- Returns
true
if the deserialization succeeded; otherwise, false
.
Implements XmobiTea.Binary.IBinaryConverter.
The documentation for this class was generated from the following file:
- XmobiTea.Binary.MessagePack/BinaryConverter.cs