[This is preliminary documentation and is subject to change.]
public void SaveToMessage( Message message )
- message (Message)
- The message to append this object to.
This calls the generated virtual SaveToMessage(Message, Boolean) method for the object being saved. To retrieve the object from the Message, you must read the References for the object and parent object from the message, determine the ObjectClass of the object in the message from, these and then call the generated CreateFromMessage method for this class.
There is a higher level way to save and retrieve an object to and from a Message. Use Message.AppendObject to save it to a Message and Message.ReadObject to retrieve it. This way allows you to save and retrieve provisional objects, which don't have class information in their References. It also allows you to set options to use the object cache, or refresh an existing object on retrieval, and is the preferred way to use Messages to serialise objects.