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

The CompositeValue object is used to convert an object to an from an XML element. This accepts only composite objects and will maintain all references within the object using the cycle strategy if required. This also ensures that should the value to be written to the XML element be null that nothing is written.
Наследование: Converter
Показать файл Открыть проект

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

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

Constructor for the CompositeValue object. This will create an object capable of reading an writing composite values from an XML element. This also allows a parent element to be created to wrap the key object if desired.

Read ( InputNode node ) : Object

This method is used to read the value object from the node. The value read from the node is resolved using the template filter. If the value data can not be found according to the annotation attributes then null is assumed and returned.

Read ( InputNode node, Object value ) : Object

This method is used to read the value object from the node. The value read from the node is resolved using the template filter. If the value data can not be found according to the annotation attributes then null is assumed and returned.

Validate ( InputNode node ) : bool

This method is used to read the value object from the node. The value read from the node is resolved using the template filter. If the value data can not be found according to the annotation attributes then null is assumed and the node is valid.

Validate ( InputNode node, String key ) : bool

This method is used to read the value object from the node. The value read from the node is resolved using the template filter. If the value data can not be found according to the annotation attributes then null is assumed and the node is valid.

Write ( OutputNode node, Object item ) : void

This method is used to write the value to the specified node. The value written to the node must be a composite object and if the object provided to this is null then nothing is written.

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

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

Constructor for the CompositeValue object. This will create an object capable of reading an writing composite values from an XML element. This also allows a parent element to be created to wrap the key object if desired.
public CompositeValue ( Context context, Entry entry, Type type ) : SimpleFramework.Xml.Strategy
context Context /// this is the root context for the serialization ///
entry Entry /// this is the entry object used for configuration ///
type System.Type /// this is the type of object the value represents ///
Результат SimpleFramework.Xml.Strategy

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

This method is used to read the value object from the node. The value read from the node is resolved using the template filter. If the value data can not be found according to the annotation attributes then null is assumed and returned.
public Read ( InputNode node ) : Object
node InputNode /// this is the node to read the value object from ///
Результат Object

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

This method is used to read the value object from the node. The value read from the node is resolved using the template filter. If the value data can not be found according to the annotation attributes then null is assumed and returned.
public Read ( InputNode node, Object value ) : Object
node InputNode /// this is the node to read the value object from ///
value Object /// this is the value to deserialize in to ///
Результат Object

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

This method is used to read the value object from the node. The value read from the node is resolved using the template filter. If the value data can not be found according to the annotation attributes then null is assumed and the node is valid.
public Validate ( InputNode node ) : bool
node InputNode /// this is the node to read the value object from ///
Результат bool

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

This method is used to read the value object from the node. The value read from the node is resolved using the template filter. If the value data can not be found according to the annotation attributes then null is assumed and the node is valid.
public Validate ( InputNode node, String key ) : bool
node InputNode /// this is the node to read the value object from ///
key String /// this is the name of the value element ///
Результат bool

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

This method is used to write the value to the specified node. The value written to the node must be a composite object and if the object provided to this is null then nothing is written.
public Write ( OutputNode node, Object item ) : void
node OutputNode /// this is the node that the value is written to ///
item Object /// this is the item that is to be written ///
Результат void