Table of Contents

Class DefaultDatatypeChannelMessageConverter

Namespace
Steeltoe.Integration.Support.Converter
Assembly
Steeltoe.Integration.IntegrationBase.dll
public class DefaultDatatypeChannelMessageConverter : IMessageConverter, IServiceNameAware
Inheritance
DefaultDatatypeChannelMessageConverter
Implements
Inherited Members

Constructors

DefaultDatatypeChannelMessageConverter(IConversionService)

public DefaultDatatypeChannelMessageConverter(IConversionService conversionService = null)

Parameters

conversionService IConversionService

Fields

DEFAULT_SERVICE_NAME

public const string DEFAULT_SERVICE_NAME = "DefaultDatatypeChannelMessageConverter"

Field Value

string

Properties

ServiceName

public string ServiceName { get; set; }

Property Value

string

Methods

FromMessage(IMessage, Type)

Convert the payload of a message to a typed object.

public object FromMessage(IMessage message, Type targetClass)

Parameters

message IMessage

the input message

targetClass Type

the target type for the conversion

Returns

object

the result of the conversion

FromMessage<T>(IMessage)

Convert the payload of a message to a typed object.

public T FromMessage<T>(IMessage message)

Parameters

message IMessage

the input message

Returns

T

the result of the conversion

Type Parameters

T

the target type for the conversion

ToMessage(object, IMessageHeaders)

Create a message whose payload is the result of converting the given payload object to serialized form.

public IMessage ToMessage(object payload, IMessageHeaders headers)

Parameters

payload object

the object to convert

headers IMessageHeaders

optional headers for the message

Returns

IMessage

the new messagee or null if converter does not support the payload type