Breyta

Deila með


ActiveXMessageFormatter Class

Definition

Serializes or deserializes primitive data types and other objects to or from the body of a Message Queuing message, using a format that is compatible with the MSMQ ActiveX Component.

public ref class ActiveXMessageFormatter : ICloneable, System::Messaging::IMessageFormatter
public class ActiveXMessageFormatter : ICloneable, System.Messaging.IMessageFormatter
type ActiveXMessageFormatter = class
    interface IMessageFormatter
    interface ICloneable
Public Class ActiveXMessageFormatter
Implements ICloneable, IMessageFormatter
Inheritance
ActiveXMessageFormatter
Implements

Remarks

The ActiveXMessageFormatter is compatible with messages sent using Message Queuing COM components, allowing interoperability with applications that use the MSMQ COM control.

The ActiveXMessageFormatter can serialize most primitives, as well as objects that implement the IPersistStream OLE interface. It can deserialize the same set of primitives, but requires further effort when deserializing a COM object (for example, an object created using Visual Basic 6.0) that implements IPersistStream. The object to deserialize must be in memory by first importing the object into a .NET Framework application.

When an application sends a message to the queue using an instance of the MessageQueue class, the formatter serializes the object into a stream and inserts it into the message body. When reading from a queue using a MessageQueue, the formatter deserializes the message data into the Body property of a Message.

ActiveX serialization is very compact, which makes using the ActiveXMessageFormatter and MSMQ COM control a very fast method of serialization.

Constructors

ActiveXMessageFormatter()

Initializes a new instance of the ActiveXMessageFormatter class.

Methods

CanRead(Message)

Determines whether the formatter can deserialize the contents of the message.

Clone()

Creates an instance of the ActiveXMessageFormatter class that is identical to the current ActiveXMessageFormatter.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
InitStreamedObject(Object)

Provides a utility to help serialize COM objects that implement IPersistStream and require IPersistStreamInit to be called.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Read(Message)

Reads the contents from the given message and creates an object that contains the deserialized message.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
Write(Message, Object)

Serializes an object into the body of the message.

Applies to