ProtonNet Server 1.0
An Open Solution for all your socket or web api needs.
Loading...
Searching...
No Matches
XmobiTea.Binary.SimplePack.BinaryConverter Class Reference
Inheritance diagram for XmobiTea.Binary.SimplePack.BinaryConverter:
XmobiTea.Binary.IBinaryConverter

Public Member Functions

byte[] Serialize< T > (T tObj)
 Serializes the specified object to a byte array.
 
void Serialize< T > (Stream stream, T tObj)
 
Deserialize< T > (Stream stream)
 
Deserialize< T > (byte[] data)
 Deserializes an object of the specified type from a byte array.
 
bool TryParse< T > (Stream stream, out T tValue)
 
bool TryParse< T > (byte[] data, out T tValue)
 Tries to parse and deserialize an object of the specified type from a byte array.
 
- Public Member Functions inherited from XmobiTea.Binary.IBinaryConverter
void Serialize< T > (System.IO.Stream stream, T tObj)
 Serializes the specified object and writes the binary data to a stream.
 
Deserialize< T > (System.IO.Stream stream)
 Deserializes an object of the specified type from a stream.
 
bool TryParse< T > (System.IO.Stream stream, out T tValue)
 Tries to parse and deserialize an object of the specified type from a stream.
 

Member Function Documentation

◆ Deserialize< T >()

T XmobiTea.Binary.SimplePack.BinaryConverter.Deserialize< T > ( byte[] data)

Deserializes an object of the specified type from a byte array.

Template Parameters
TThe type of the object to deserialize.
Parameters
dataThe byte array containing the serialized object.
Returns
The deserialized object of type T .

Implements XmobiTea.Binary.IBinaryConverter.

◆ Serialize< T >()

byte[] XmobiTea.Binary.SimplePack.BinaryConverter.Serialize< T > ( T tObj)

Serializes the specified object to a byte array.

Template Parameters
TThe type of the object to serialize.
Parameters
tObjThe object to serialize.
Returns
A byte array representing the serialized object.

Implements XmobiTea.Binary.IBinaryConverter.

◆ TryParse< T >()

bool XmobiTea.Binary.SimplePack.BinaryConverter.TryParse< T > ( byte[] data,
out T tValue )

Tries to parse and deserialize an object of the specified type from a byte array.

Template Parameters
TThe type of the object to deserialize.
Parameters
dataThe byte array containing the serialized object.
tValueWhen this method returns, contains the deserialized object of type T if the parsing succeeded, or the default value of T if the parsing failed.
Returns
true if the parsing succeeded; otherwise, false.

Implements XmobiTea.Binary.IBinaryConverter.


The documentation for this class was generated from the following file: