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.
Namespace: SolaceSystems.Solclient.Messaging.SerializationAssembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 10.29.0
public static T Deserialize<T>(
this IMessage msg,
IDeserializer<T> deserializer,
IDestination destination = null
)
- 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.
- T
- The output data object type.
TThe deserialized data object of type TIn 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).
| SerializationException | Raised when deserializer.Deserialize failure occurs |