Aller au contenu
Abblix
Cette page n'a pas encore été traduite.

IBinarySerializer Interface

Defines the contract for a binary serializer that supports serialization and deserialization of objects to and from binary format.

C#
public interface IBinarySerializer

Derived
JsonBinarySerializer
CompositeBinarySerializer
ProtobufSerializer

Methods

IBinarySerializer.Deserialize<T>(byte[]) Method

Deserializes a binary array to an object of type T.

C#
T? Deserialize<T>(byte[] bytes);

Type parameters

T

The type of the object to deserialize to.

Parameters

bytes System.Byte[]

The binary array to deserialize from.

Returns

T
The deserialized object of type T.

IBinarySerializer.Serialize<T>(T) Method

Serializes an object of type T to a binary array.

C#
byte[] Serialize<T>(T obj);

Type parameters

T

The type of the object to serialize.

Parameters

obj T

The object to serialize.

Returns

System.Byte[]
A binary array representing the serialized object.