Class BinarySerializer
Implements functions for serializing and deserializing of objects.
Inheritance
System.Object
BinarySerializer
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Serialization
Assembly: Sartorius.SAF.dll
Syntax
[Obsolete("BinaryFormatter is obsolete and a security risk.")]
public static class BinarySerializer
Methods
View SourceDeSerializeObject(ref Byte[])
Deserialize a given content.
Declaration
public static object DeSerializeObject(ref byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | A content as stream of bytes. |
Returns
Type | Description |
---|---|
System.Object | Content after deserialization. |
SerializeObject(Object)
Serialize a given object which can be serialized.
Declaration
public static byte[] SerializeObject(object objectGraph)
Parameters
Type | Name | Description |
---|---|---|
System.Object | objectGraph | Object to Serialize |
Returns
Type | Description |
---|---|
System.Byte[] | A stream of bytes as result of a serialization or null. |
UnZipData(ref Byte[])
Decompress the given bytes.
Declaration
public static void UnZipData(ref byte[] byteArray)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | byteArray |
ZipContent(ref Byte[])
Compress the given bytes.
Declaration
public static void ZipContent(ref byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes |