C# 클래스 SimpleFramework.Xml.Core.CompositeKey

The CompositeKey object is used to convert an object to an from an XML element. This accepts only composite objects and will throw an exception if the ElementMap annotation is configured to have an attribute key. If a key name is given for the annotation then this will act as a parent element to the resulting XML element for the composite object.
상속: Converter
파일 보기 프로젝트 열기: ngallagher/simplexml 1 사용 예제들

공개 메소드들

메소드 설명
CompositeKey ( Context context, Entry entry, Type type ) : SimpleFramework.Xml.Strategy

Constructor for the CompositeKey object. This will create an object capable of reading an writing composite keys 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 key value from the node. The value read from the node is resolved using the template filter. If the key value 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 key value from the node. The value read from the node is resolved using the template filter. If the key value can not be found according to the annotation attributes then null is assumed and returned.

Read ( InputNode node, String key ) : Object

This method is used to read the key value from the node. The value read from the node is resolved using the template filter. If the key value 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 key value from the node. The value read from the node is resolved using the template filter. If the key value 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 key value from the node. The value read from the node is resolved using the template filter. If the key value 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 element map annotation is configured to have a key attribute then this method will throw an exception.

메소드 상세

CompositeKey() 공개 메소드

Constructor for the CompositeKey object. This will create an object capable of reading an writing composite keys from an XML element. This also allows a parent element to be created to wrap the key object if desired.
public CompositeKey ( 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 key represents ///
리턴 SimpleFramework.Xml.Strategy

Read() 공개 메소드

This method is used to read the key value from the node. The value read from the node is resolved using the template filter. If the key value 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 key value from ///
리턴 Object

Read() 공개 메소드

This method is used to read the key value from the node. The value read from the node is resolved using the template filter. If the key value 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 key value from ///
value Object /// this is the value to deserialize in to ///
리턴 Object

Read() 공개 메소드

This method is used to read the key value from the node. The value read from the node is resolved using the template filter. If the key value can not be found according to the annotation attributes then null is assumed and returned.
public Read ( InputNode node, String key ) : Object
node InputNode /// this is the node to read the key value from ///
key String /// this is the name of the key wrapper XML element ///
리턴 Object

Validate() 공개 메소드

This method is used to read the key value from the node. The value read from the node is resolved using the template filter. If the key value 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 key value from ///
리턴 bool

Validate() 공개 메소드

This method is used to read the key value from the node. The value read from the node is resolved using the template filter. If the key value 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 key value from ///
key String /// this is the name of the key wrapper XML 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 element map annotation is configured to have a key attribute then this method will throw an exception.
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