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

The PrimitiveInlineList object is used to convert a group of elements in to a collection of element entries. This is used when a containing element for a list is not required. It extracts the elements by matching elements to name of the type that the annotated field or method requires. This enables these element entries to exist as siblings to other objects within the object. One restriction is that the Root annotation for each of the types within the list must be the same. <entry>example one</entry> <entry>example two</entry> <entry>example three</entry> <entry>example four</entry> For the above XML element list the element entry is used to wrap the primitive string value. This wrapping XML element is configurable and defaults to the lower case string for the name of the class it represents. So, for example, if the primitive type is an int the enclosing element will be called int.
Наследование: Repeater
Показать файл Открыть проект

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

Метод Описание
IsOverridden ( OutputNode node, Object value ) : bool

This is used to determine whether the specified value has been overridden by the strategy. If the item has been overridden then no more serialization is require for that value, this is effectively telling the serialization process to stop writing.

PrimitiveInlineList ( Context context, Type type, Type entry, String parent ) : SimpleFramework.Xml.Strategy

Constructor for the PrimitiveInlineList object. This is given the list type and entry type to be used. The list type is the Collection implementation that is used to collect the deserialized entry objects from the XML source.

Read ( InputNode node ) : Object

This read method wll read the XML element list from the provided node and deserialize its children as entry types. This will deserialize each entry type as a primitive value. In order to do this the parent string provided forms the element.

Read ( InputNode node, Collection list ) : Object

This read method wll read the XML element list from the provided node and deserialize its children as entry types. This will deserialize each entry type as a primitive value. In order to do this the parent string provided forms the element.

Read ( InputNode node, Object value ) : Object

This read method wll read the XML element list from the provided node and deserialize its children as entry types. This will deserialize each entry type as a primitive value. In order to do this the parent string provided forms the element.

Validate ( InputNode node ) : bool

This read method wll read the XML element list from the provided node and deserialize its children as entry types. This will deserialize each entry type as a primitive value. In order to do this the parent string provided forms the element.

Write ( OutputNode node, Object source ) : void

This write method will write the specified object to the given XML element as as list entries. Each entry within the given list must be assignable to the given primitive type. This will deserialize each entry type as a primitive value. In order to do this the parent string provided forms the element.

Write ( OutputNode node, Object source, Mode mode ) : void

This write method will write the specified object to the given XML element as as list entries. Each entry within the given list must be assignable to the given primitive type. This will deserialize each entry type as a primitive value. In order to do this the parent string provided forms the element.

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

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

This is used to determine whether the specified value has been overridden by the strategy. If the item has been overridden then no more serialization is require for that value, this is effectively telling the serialization process to stop writing.
public IsOverridden ( OutputNode node, Object value ) : bool
node OutputNode /// the node that a potential override is written to ///
value Object /// this is the object instance to be serialized ///
Результат bool

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

Constructor for the PrimitiveInlineList object. This is given the list type and entry type to be used. The list type is the Collection implementation that is used to collect the deserialized entry objects from the XML source.
public PrimitiveInlineList ( Context context, Type type, Type entry, String parent ) : SimpleFramework.Xml.Strategy
context Context /// this is the context object used for serialization ///
type System.Type /// this is the collection type for the list used ///
entry System.Type /// the entry type to be stored within the list ///
parent String /// this is the name to wrap the list element with ///
Результат SimpleFramework.Xml.Strategy

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

This read method wll read the XML element list from the provided node and deserialize its children as entry types. This will deserialize each entry type as a primitive value. In order to do this the parent string provided forms the element.
public Read ( InputNode node ) : Object
node InputNode /// this is the XML element that is to be deserialized ///
Результат Object

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

This read method wll read the XML element list from the provided node and deserialize its children as entry types. This will deserialize each entry type as a primitive value. In order to do this the parent string provided forms the element.
public Read ( InputNode node, Collection list ) : Object
node InputNode /// this is the XML element that is to be deserialized ///
list Collection /// this is the collection that is to be populated ///
Результат Object

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

This read method wll read the XML element list from the provided node and deserialize its children as entry types. This will deserialize each entry type as a primitive value. In order to do this the parent string provided forms the element.
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 wll read the XML element list from the provided node and deserialize its children as entry types. This will deserialize each entry type as a primitive value. In order to do this the parent string provided forms the element.
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 specified object to the given XML element as as list entries. Each entry within the given list must be assignable to the given primitive type. This will deserialize each entry type as a primitive value. In order to do this the parent string provided forms the element.
public Write ( OutputNode node, Object source ) : void
node OutputNode /// this is the XML element container to be populated ///
source Object /// this is the source collection to be serialized ///
Результат void

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

This write method will write the specified object to the given XML element as as list entries. Each entry within the given list must be assignable to the given primitive type. This will deserialize each entry type as a primitive value. In order to do this the parent string provided forms the element.
public Write ( OutputNode node, Object source, Mode mode ) : void
node OutputNode /// this is the parent output node to write values to ///
source Object /// this is the source collection to be serialized ///
mode Mode /// this is used to determine whether to output CDATA ///
Результат void