C# Class SimpleFramework.Xml.Strategy.ReadGraph

The ReadGraph object is used to build a graph of the objects that have been deserialized from the XML document. This is required so that cycles in the object graph can be recreated such that the deserialized object is an exact duplicate of the object that was serialized. Objects are stored in the graph using unique keys, which for this implementation are unique strings.
Inheritance: Dictionary
Show file Open project: ngallagher/simplexml

Public Methods

Method Description
Read ( Type type, NodeMap node ) : Value

This is used to recover the object references from the document using the special attributes specified. This allows the element specified by the NodeMap to be used to discover exactly which node in the object graph the element represents.

ReadArray ( Type type, Class real, NodeMap node ) : Value

This is used to acquire the Value which can be used to represent the deserialized value. The type create cab be added to the graph of created instances if the XML element has an identification attribute, this allows cycles to be completed.

ReadGraph ( Contract contract, Loader loader ) : SimpleFramework.Xml.Stream

Constructor for the ReadGraph object. This is used to create graphs that are used for reading objects from the XML document. The specified strategy is used to acquire the names of the special attributes used during the serialization.

ReadInstance ( Type type, Class real, NodeMap node ) : Value

This is used to recover the object references from the document using the special attributes specified. This allows the element specified by the NodeMap to be used to discover exactly which node in the object graph the element represents.

ReadReference ( Type type, Class real, NodeMap node ) : Value

This is used to recover the object references from the document using the special attributes specified. This allows the element specified by the NodeMap to be used to discover exactly which node in the object graph the element represents.

ReadValue ( Type type, Class real, NodeMap node ) : Value

This is used to acquire the Value which can be used to represent the deserialized value. The type create cab be added to the graph of created instances if the XML element has an identification attribute, this allows cycles to be completed.

ReadValue ( Type type, Class real, NodeMap node, String key ) : Value

This is used to acquire the Value which can be used to represent the deserialized value. The type create cab be added to the graph of created instances if the XML element has an identification attribute, this allows cycles to be completed.

Method Details

Read() public method

This is used to recover the object references from the document using the special attributes specified. This allows the element specified by the NodeMap to be used to discover exactly which node in the object graph the element represents.
public Read ( Type type, NodeMap node ) : Value
type System.Type /// the type of the field or method in the instance ///
node NodeMap /// this is the XML element to be deserialized ///
return Value

ReadArray() public method

This is used to acquire the Value which can be used to represent the deserialized value. The type create cab be added to the graph of created instances if the XML element has an identification attribute, this allows cycles to be completed.
public ReadArray ( Type type, Class real, NodeMap node ) : Value
type System.Type /// the type of the field or method in the instance ///
real Class /// this is the overridden type from the XML element ///
node NodeMap /// this is the XML element to be deserialized ///
return Value

ReadGraph() public method

Constructor for the ReadGraph object. This is used to create graphs that are used for reading objects from the XML document. The specified strategy is used to acquire the names of the special attributes used during the serialization.
public ReadGraph ( Contract contract, Loader loader ) : SimpleFramework.Xml.Stream
contract System.Contract /// this is the name scheme used by the strategy ///
loader Loader /// this is the class loader to used for the graph ///
return SimpleFramework.Xml.Stream

ReadInstance() public method

This is used to recover the object references from the document using the special attributes specified. This allows the element specified by the NodeMap to be used to discover exactly which node in the object graph the element represents.
public ReadInstance ( Type type, Class real, NodeMap node ) : Value
type System.Type /// the type of the field or method in the instance ///
real Class /// this is the overridden type from the XML element ///
node NodeMap /// this is the XML element to be deserialized ///
return Value

ReadReference() public method

This is used to recover the object references from the document using the special attributes specified. This allows the element specified by the NodeMap to be used to discover exactly which node in the object graph the element represents.
public ReadReference ( Type type, Class real, NodeMap node ) : Value
type System.Type /// the type of the field or method in the instance ///
real Class /// this is the overridden type from the XML element ///
node NodeMap /// this is the XML element to be deserialized ///
return Value

ReadValue() public method

This is used to acquire the Value which can be used to represent the deserialized value. The type create cab be added to the graph of created instances if the XML element has an identification attribute, this allows cycles to be completed.
public ReadValue ( Type type, Class real, NodeMap node ) : Value
type System.Type /// the type of the field or method in the instance ///
real Class /// this is the overridden type from the XML element ///
node NodeMap /// this is the XML element to be deserialized ///
return Value

ReadValue() public method

This is used to acquire the Value which can be used to represent the deserialized value. The type create cab be added to the graph of created instances if the XML element has an identification attribute, this allows cycles to be completed.
public ReadValue ( Type type, Class real, NodeMap node, String key ) : Value
type System.Type /// the type of the field or method in the instance ///
real Class /// this is the overridden type from the XML element ///
node NodeMap /// this is the XML element to be deserialized ///
key String /// the key the instance is known as in the graph ///
return Value