Interface ISmartMessageConverter
An extended message converter supporting conversion hints
Inherited Members
Namespace: Steeltoe.Messaging.Converter
Assembly: Steeltoe.Messaging.Abstractions.dll
Syntax
public interface ISmartMessageConverter : IMessageConverter
Methods
| Edit this page View SourceFromMessage(IMessage, Type, Object)
Convert the payload of a message to a typed object.
Declaration
object FromMessage(IMessage message, Type targetClass, object conversionHint)
Parameters
Type | Name | Description |
---|---|---|
IMessage | message | the input message |
Type | targetClass | the target type of the conversion |
System.Object | conversionHint | an extra object passed to the converter which may used for handling the conversion |
Returns
Type | Description |
---|---|
System.Object | the result of the conversion |
FromMessage<T>(IMessage, Object)
Convert the payload of a message to a typed object.
Declaration
T FromMessage<T>(IMessage message, object conversionHint)
Parameters
Type | Name | Description |
---|---|---|
IMessage | message | the input message |
System.Object | conversionHint | an extra object passed to the converter which may used for handling the conversion |
Returns
Type | Description |
---|---|
T | the result of the conversion |
Type Parameters
Name | Description |
---|---|
T | the target type for the conversion |
ToMessage(Object, IMessageHeaders, Object)
Create a message whose payload is the result of converting the given payload object to serialized form.
Declaration
IMessage ToMessage(object payload, IMessageHeaders headers, object conversionHint)
Parameters
Type | Name | Description |
---|---|---|
System.Object | payload | the object to convert |
IMessageHeaders | headers | optional headers for the message |
System.Object | conversionHint | an extra object passed to the converter which may used for handling the conversion |
Returns
Type | Description |
---|---|
IMessage | the new messagee or null if converter does not support the payload type |