BrokeredMessage.GetBody BrokeredMessage.GetBody BrokeredMessage.GetBody Method

Definition

Overloads

GetBody<T>() GetBody<T>() GetBody<T>()

Deserializes the brokered message body into an object of the specified type by using the DataContractSerializer with a binary XmlDictionaryReader.

GetBody<T>(XmlObjectSerializer) GetBody<T>(XmlObjectSerializer) GetBody<T>(XmlObjectSerializer)

Deserializes the BrokeredMessage body into an object of the specified type using DataContractSerializer with a Binary XmlObjectSerializer.

GetBody<T>() GetBody<T>() GetBody<T>()

Deserializes the brokered message body into an object of the specified type by using the DataContractSerializer with a binary XmlDictionaryReader.

public T GetBody<T> ();
member this.GetBody : unit -> 'T
Public Function GetBody(Of T) () As T
Type Parameters
T

The type to which the message body will be deserialized.

Returns

The deserialized object or graph.

Exceptions

If the message is in disposed state or the message body stream is already disposed.

If the message contains a null body stream or the body stream contains no data or the message body has already been consumed.

GetBody<T>(XmlObjectSerializer) GetBody<T>(XmlObjectSerializer) GetBody<T>(XmlObjectSerializer)

Deserializes the BrokeredMessage body into an object of the specified type using DataContractSerializer with a Binary XmlObjectSerializer.

public T GetBody<T> (System.Runtime.Serialization.XmlObjectSerializer serializer);
member this.GetBody : System.Runtime.Serialization.XmlObjectSerializer -> 'T
Public Function GetBody(Of T) (serializer As XmlObjectSerializer) As T
Type Parameters
T

Generic type parameter.

Parameters
serializer
XmlObjectSerializer XmlObjectSerializer XmlObjectSerializer

The serializer object.

Returns

The deserialized object/graph

Exceptions

Thrown if the message contains a Null body stream, contains no data, or if the stream has been read once (through any GetBody() calls).

Applies to