C# Класс SimpleFramework.Xml.Core.CompositeInlineMap

The CompositeMap is used to serialize and deserialize maps to and from a source XML document. The structure of the map in the XML format is determined by the annotation. Keys can be either attributes or elements, and values can be inline. This can perform serialization and deserialization of the key and value objects whether the object types are primitive or composite. <map> <entry key='1'> <value>one</value> </entry> <entry key='2'> <value>two</value> </entry> </map> For the above XML element map the element entry is used to wrap the key and value such that they can be grouped. This element does not represent any real object. The names of each of the XML elements serialized and deserialized can be configured.
Наследование: Repeater
Показать файл Открыть проект

Открытые методы

Метод Описание
CompositeInlineMap ( Context context, Entry entry, Type type ) : SimpleFramework.Xml.Strategy

Constructor for the CompositeMap object. This will create a converter that is capable of writing map objects to and from XML. The resulting XML is configured by an annotation such that key values can attributes and values can be inline.

Read ( InputNode node ) : Object

This read method will read the XML element map from the provided node and deserialize its children as entry types. Each entry type must contain a key and value so that the entry can be inserted in to the map as a pair. If either the key or value is composite it is read as a root object, which means its Root annotation must be present and the name of the object element must match that root element name.

Read ( InputNode node, Dictionary map ) : Object

This read method will read the XML element map from the provided node and deserialize its children as entry types. Each entry type must contain a key and value so that the entry can be inserted in to the map as a pair. If either the key or value is composite it is read as a root object, which means its Root annotation must be present and the name of the object element must match that root element name.

Read ( InputNode node, Object value ) : Object

This read method will read the XML element map from the provided node and deserialize its children as entry types. Each entry type must contain a key and value so that the entry can be inserted in to the map as a pair. If either the key or value is composite it is read as a root object, which means its Root annotation must be present and the name of the object element must match that root element name.

Validate ( InputNode node ) : bool

This read method will read the XML element map from the provided node and deserialize its children as entry types. Each entry type must contain a key and value so that the entry can be inserted in to the map as a pair. If either the key or value is composite it is read as a root object, which means its Root annotation must be present and the name of the object element must match that root element name.

Write ( OutputNode node, Dictionary map, Mode mode ) : void

This write method will write the key value pairs within the provided map to the specified XML node. This will write each entry type must contain a key and value so that the entry can be deserialized in to the map as a pair. If the key or value object is composite it is read as a root object so its Root annotation must be present.

Write ( OutputNode node, Object source ) : void

This write method will write the key value pairs within the provided map to the specified XML node. This will write each entry type must contain a key and value so that the entry can be deserialized in to the map as a pair. If the key or value object is composite it is read as a root object so its Root annotation must be present.

Описание методов

CompositeInlineMap() публичный Метод

Constructor for the CompositeMap object. This will create a converter that is capable of writing map objects to and from XML. The resulting XML is configured by an annotation such that key values can attributes and values can be inline.
public CompositeInlineMap ( Context context, Entry entry, Type type ) : SimpleFramework.Xml.Strategy
context Context /// this is the root context for the serialization ///
entry Entry /// this provides configuration for the resulting XML ///
type System.Type /// this is the map type that is to be converted ///
Результат SimpleFramework.Xml.Strategy

Read() публичный Метод

This read method will read the XML element map from the provided node and deserialize its children as entry types. Each entry type must contain a key and value so that the entry can be inserted in to the map as a pair. If either the key or value is composite it is read as a root object, which means its Root annotation must be present and the name of the object element must match that root element name.
public Read ( InputNode node ) : Object
node InputNode /// this is the XML element that is to be deserialized ///
Результат Object

Read() публичный Метод

This read method will read the XML element map from the provided node and deserialize its children as entry types. Each entry type must contain a key and value so that the entry can be inserted in to the map as a pair. If either the key or value is composite it is read as a root object, which means its Root annotation must be present and the name of the object element must match that root element name.
public Read ( InputNode node, Dictionary map ) : Object
node InputNode /// this is the XML element that is to be deserialized ///
map Dictionary /// this is the map object that is to be populated ///
Результат Object

Read() публичный Метод

This read method will read the XML element map from the provided node and deserialize its children as entry types. Each entry type must contain a key and value so that the entry can be inserted in to the map as a pair. If either the key or value is composite it is read as a root object, which means its Root annotation must be present and the name of the object element must match that root element name.
public Read ( InputNode node, Object value ) : Object
node InputNode /// this is the XML element that is to be deserialized ///
value Object
Результат Object

Validate() публичный Метод

This read method will read the XML element map from the provided node and deserialize its children as entry types. Each entry type must contain a key and value so that the entry can be inserted in to the map as a pair. If either the key or value is composite it is read as a root object, which means its Root annotation must be present and the name of the object element must match that root element name.
public Validate ( InputNode node ) : bool
node InputNode /// this is the XML element that is to be deserialized ///
Результат bool

Write() публичный Метод

This write method will write the key value pairs within the provided map to the specified XML node. This will write each entry type must contain a key and value so that the entry can be deserialized in to the map as a pair. If the key or value object is composite it is read as a root object so its Root annotation must be present.
public Write ( OutputNode node, Dictionary map, Mode mode ) : void
node OutputNode /// this is the node the map is to be written to ///
map Dictionary /// this is the source map that is to be written ///
mode Mode /// this is the mode that has been inherited ///
Результат void

Write() публичный Метод

This write method will write the key value pairs within the provided map to the specified XML node. This will write each entry type must contain a key and value so that the entry can be deserialized in to the map as a pair. If the key or value object is composite it is read as a root object so its Root annotation must be present.
public Write ( OutputNode node, Object source ) : void
node OutputNode /// this is the node the map is to be written to ///
source Object /// this is the source map that is to be written ///
Результат void