-
Notifications
You must be signed in to change notification settings - Fork 0
Serializer
Liam edited this page Mar 26, 2021
·
2 revisions
This project contains a default implmentation of the IMessagePackSerializer interface that simply uses MessagePackSerializer and some basic options. If your uses case needs to expand on the the way data is serialized you can implment your own IMessagePackSerializer.
IMessagePackSerializer has two methods Serialize and Deserialize.
This method is intended to be used to call MessagePackSerializer.SerializeAsync and is given a stream and the data to serialize into that stream.
Task Serialize<TDataType>(Stream stream, TDataType data);
This method is intended to be used to call MessagePackSerializer.DeserializeAsync and is given a stream to deserialize from and return the deserialized data.
ValueTask<TDataType> Deserialize<TDataType>(Stream stream);