using Tapeti.Config; namespace Tapeti { /// /// Provides serialization and deserialization for messages. /// public interface IMessageSerializer { /// /// Serialize a message object instance to a byte array. /// /// An instance of a message class /// Writable access to the message properties which will be sent along with the message /// The encoded message byte[] Serialize(object message, IMessageProperties properties); /// /// Deserializes a previously serialized message. /// /// The encoded message /// The properties as sent along with the message /// A decoded instance of the message object Deserialize(byte[] body, IMessageProperties properties); } }