10.29.00

MessageSerializationExtensionsDeserializeT Method

The IMessage.Deserailize extension method. Deserializes the message binaryAttachment into the returned data object with IDeserializer. Note this will load native user property data from the IMessage into managed memory. Note the user properties will be reset for field iteration. So Rewind is called.

Definition

Namespace: SolaceSystems.Solclient.Messaging.Serialization
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 10.29.0
C#
public static T Deserialize<T>(
	this IMessage msg,
	IDeserializer<T> deserializer,
	IDestination destination = null
)

Parameters

msg  IMessage
The SMF meesage to extract data from.
deserializer  IDeserializerT
The IDeserializer to convert the binaryAttachment into data type T. Unsupported header value data type will be ignored. Check debug logs for details. The list of header value data types supported for deserialization:
  • string
  • bool
  • byte[]
  • byte
  • sbyte
  • ushort
  • short
  • uint
  • int
  • ulong
  • long
  • char
  • float
  • double
destination  IDestination  (Optional)
Optional destination provided to Deserializer.

Type Parameters

T
The output data object type.

Return Value

T
The deserialized data object of type T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IMessage. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

SerializationExceptionRaised when deserializer.Deserialize failure occurs

See Also