An architecture and method is provided that facilitates serialization of a graph
of objects into streams of data in an arbitrary format, and deserialization of
the streams of data back into the graph of objects. The architecture provides a
number of services associated with the basic functionality of serialization and
deserialization. The services can be employed to implement transparent remoting,
copy items to a clipboard and save data to a file. The present invention provides
facilities which support the plugging in of a new serialization encoding by separating
the encoding from the reading and reinstantiation of the graph of objects which
the encoding describes. Objects in a graph of objects are serialized and deserialized
based on a selected rule set for that object. A rule set can be provided by a class
author within a class or within a third party file referred to as a surrogate.