IMessageFormatter Interface
Serializes or deserializes objects from the body of a Message Queuing message.
Assembly: System.Messaging (in System.Messaging.dll)
The IMessageFormatter type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | CanRead | When implemented in a class, determines whether the formatter can deserialize the contents of the message. |
![]() | Clone | Creates a new object that is a copy of the current instance. (Inherited from ICloneable.) |
![]() | Read | When implemented in a class, reads the contents from the given message and creates an object that contains data from the message. |
![]() | Write | When implemented in a class, serializes an object into the body of the message. |
When an application sends a message to the queue using an instance of the MessageQueue class, the formatter serializes the object (which can be an instance of any class) 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.
BinaryMessageFormatter and ActiveXMessageFormatter provide faster throughput than the XmlMessageFormatter. The ActiveXMessageFormatter allows interoperability with Visual Basic 6.0 Message Queuing applications. The XmlMessageFormatter is loosely coupled, which means that the server and client can version the type that is sent and received independently.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
