BrokeredMessage BrokeredMessage BrokeredMessage Constructors

Definition

Overloads

BrokeredMessage() BrokeredMessage()

Initializes a new instance of the BrokeredMessage class.

BrokeredMessage(Stream) BrokeredMessage(Stream) BrokeredMessage(Stream)

Initializes a new instance of the BrokeredMessage class.

BrokeredMessage(Object) BrokeredMessage(Object) BrokeredMessage(Object)

Initializes a new instance of the BrokeredMessage class from a given object by using DataContractSerializer with a binary XmlDictionaryWriter.

BrokeredMessage(Stream, Boolean) BrokeredMessage(Stream, Boolean) BrokeredMessage(Stream, Boolean)

Initializes a new instance of the BrokeredMessage class using the supplied stream as its body.

BrokeredMessage(Object, XmlObjectSerializer) BrokeredMessage(Object, XmlObjectSerializer) BrokeredMessage(Object, XmlObjectSerializer)

Constructor that creates a BrokeredMessage from a given object using the provided XmlObjectSerializer

BrokeredMessage() BrokeredMessage()

Initializes a new instance of the BrokeredMessage class.

public BrokeredMessage ();
Public Sub New ()

BrokeredMessage(Stream) BrokeredMessage(Stream) BrokeredMessage(Stream)

Initializes a new instance of the BrokeredMessage class.

public BrokeredMessage (System.IO.Stream messageBodyStream);
new Microsoft.ServiceBus.Messaging.BrokeredMessage : System.IO.Stream -> Microsoft.ServiceBus.Messaging.BrokeredMessage
Public Sub New (messageBodyStream As Stream)
Parameters
messageBodyStream
Stream Stream Stream

The message body stream.

BrokeredMessage(Object) BrokeredMessage(Object) BrokeredMessage(Object)

Initializes a new instance of the BrokeredMessage class from a given object by using DataContractSerializer with a binary XmlDictionaryWriter.

public BrokeredMessage (object serializableObject);
new Microsoft.ServiceBus.Messaging.BrokeredMessage : obj -> Microsoft.ServiceBus.Messaging.BrokeredMessage
Public Sub New (serializableObject As Object)
Parameters
serializableObject
Object Object Object

The object to be serialized into the message body.

Remarks

A default Microsoft.ServiceBus.Messaging.DataContractBinarySerializer is used for serializing the object.

BrokeredMessage(Stream, Boolean) BrokeredMessage(Stream, Boolean) BrokeredMessage(Stream, Boolean)

Initializes a new instance of the BrokeredMessage class using the supplied stream as its body.

public BrokeredMessage (System.IO.Stream messageBodyStream, bool ownsStream);
new Microsoft.ServiceBus.Messaging.BrokeredMessage : System.IO.Stream * bool -> Microsoft.ServiceBus.Messaging.BrokeredMessage
Public Sub New (messageBodyStream As Stream, ownsStream As Boolean)
Parameters
messageBodyStream
Stream Stream Stream

The message body stream.

ownsStream
Boolean Boolean Boolean

true to indicate that the stream will be closed when the message is closed; false to indicate that the stream will not be closed when the message is closed.

BrokeredMessage(Object, XmlObjectSerializer) BrokeredMessage(Object, XmlObjectSerializer) BrokeredMessage(Object, XmlObjectSerializer)

Constructor that creates a BrokeredMessage from a given object using the provided XmlObjectSerializer

public BrokeredMessage (object serializableObject, System.Runtime.Serialization.XmlObjectSerializer serializer);
new Microsoft.ServiceBus.Messaging.BrokeredMessage : obj * System.Runtime.Serialization.XmlObjectSerializer -> Microsoft.ServiceBus.Messaging.BrokeredMessage
Public Sub New (serializableObject As Object, serializer As XmlObjectSerializer)
Parameters
serializableObject
Object Object Object

The serializable object.

serializer
XmlObjectSerializer XmlObjectSerializer XmlObjectSerializer

The serializer object.

Exceptions

Thrown when null serializer is passed to the method with a non-null serializableObject

Remarks

You should be aware of the exceptions that their provided Serializer can throw and take appropriate actions. Please refer to for a possible list of exceptions and their cause.

Applies to