Method Serialize
Serialize(object)
Serialize a data object and return the data as object.
Declaration
object Serialize(object data)
Parameters
Type | Name | Description |
---|---|---|
object | data | The data object to serialize |
Returns
Type | Description |
---|---|
object | The serialized data as an object |
Serialize(object, bool)
Serialize a data object and return the data as string. Can use encryption.
Declaration
string Serialize(object data, bool encrypted = false)
Parameters
Type | Name | Description |
---|---|---|
object | data | The data object to serialize |
bool | encrypted | Is the serialization encrypted |
Returns
Type | Description |
---|---|
string | The serialized data as an string |
Serialize<T>(T, Stream, bool)
Serialize the data of a generic type T and write the data through a stream. Can use encryption.
Declaration
void Serialize<T>(T data, Stream stream, bool encrypted = false)
Parameters
Type | Name | Description |
---|---|---|
T | data | The data as type T to serialize |
Stream | stream | The stream through which the serialization is supposed to be written |
bool | encrypted | Is the serialization encrypted |
Type Parameters
Name | Description |
---|---|
T | The type of the data to be serialized |
Serialize<T>(T, bool)
Serialize the data of a generic type T and return the data as string. Can use encryption.
Declaration
string Serialize<T>(T data, bool encrypted = false)
Parameters
Type | Name | Description |
---|---|---|
T | data | The data as type T to serialize |
bool | encrypted | Is the serialization encrypted |
Returns
Type | Description |
---|---|
string | The serialized data as a string |
Type Parameters
Name | Description |
---|---|
T | The type of the data to be serialized |