您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

BrokeredMessage.GetBody Method

Definition

Overloads

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)

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

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> ();
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)

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);
Type Parameters
T

Generic type parameter.

Parameters
serializer
XmlObjectSerializer

The serializer object.

Returns

The deserialized object/graph

Exceptions

Thrown if the message is in disposed state.

Thrown when invoked with a Null serializer object.

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