Interface ISerializer<T>
Interface to convert POCO objects into serialized payload bytes.
public interface ISerializer<in T>
Type Parameters
TGeneric type argument for the input object on Serialize(string, T, IDictionary<string, object>).
Methods
Configure(IDictionary<string, object>)
Configures this ISerializer<T> with the specified properties.
void Configure(IDictionary<string, object> properties)
Parameters
propertiesIDictionary<string, object>The configuration properties
Serialize(string, T, IDictionary<string, object>)
Serializes given object and destination, with optional headers.
byte[] Serialize(string destinationName, T obj, IDictionary<string, object> headers = null)
Parameters
destinationNamestringThe topic or queue name to route the object.
objTBusiness object to serialize.
headersIDictionary<string, object>Defines additional headers that are not included in the returned bytes. This parameter can be used as an in/out parameter and may be modified during serialization. May be
null.
Returns
- byte[]
A byte array from the serialized object that will be added as carrier payload.