Interface IDeserializer<T>
Interface to convert serialized payload bytes into POCO objects.
public interface IDeserializer<out T>
Type Parameters
TGeneric type argument for the output object on Deserialize(string, ReadOnlySpan<byte>, IDictionary<string, object>)
Methods
Configure(IDictionary<string, object>)
Configures this IDeserializer<T> with the specified properties.
void Configure(IDictionary<string, object> properties)
Parameters
propertiesIDictionary<string, object>The configuration properties
Deserialize(string, ReadOnlySpan<byte>, IDictionary<string, object>)
Deserialize payload bytes into business object of type T. Optionally, headers can be provided to include additional metadata not in the payload bytes.
T Deserialize(string destinationName, ReadOnlySpan<byte> payload, IDictionary<string, object> headers = null)
Parameters
destinationNamestringThe topic or queue name to route the object.
payloadReadOnlySpan<byte>The ReadOnlySpan{byte} of payload from carrier to deserialize into an object of type T.
headersIDictionary<string, object>Optional. Defines additional headers not included in the payload bytes. This can be an in/out parameter and can be modified on call to deserialize if present.
Returns
- T
Constructed object of type T from byte[] of payload and headers (if provided).