Interface IHeaderMapper<T>
Generic strategy interface for mapping MessageHeaders to and from other types of objects.
public interface IHeaderMapper<in T>
Type Parameters
T
type of the instance to and from which headers will be mapped
Methods
FromHeaders(IMessageHeaders, T)
Map from the given MessageHeaders to the specified target message.
void FromHeaders(IMessageHeaders headers, T target)
Parameters
headers
IMessageHeadersthe incoming message headers
target
Tthe native target message
ToHeaders(T)
Map from the given target message to abstracted MessageHeaders.
IMessageHeaders ToHeaders(T source)
Parameters
source
Tthe native target message
Returns
- IMessageHeaders
the mapped message headers