C# Class SimpleFramework.Xml.Core.Decorator

This acts as a strategy and intercepts all XML elements that are serialized and deserialized so that the XML can be manipulated by the provided interceptor implementation.
Inheritance: Strategy
Afficher le fichier Open project: restlet/simplexml Class Usage Examples

Méthodes publiques

Méthode Description
Decorator ( SimpleFramework.Xml.Core.Interceptor interceptor, Strategy strategy ) : SimpleFramework.Xml.Strategy
Read ( Type field, NodeMap node, Dictionary map ) : Value

Here we intercept the call to get the element value from the strategy so that we can change the attributes in the XML element to match what was change on writing the element.

Write ( Type field, Object value, NodeMap node, Dictionary map ) : bool

Here we change the XML element after it has been annotated by the strategy. In this way we can ensure we write what we want to the resulting XML document.

Method Details

Decorator() public méthode

public Decorator ( SimpleFramework.Xml.Core.Interceptor interceptor, Strategy strategy ) : SimpleFramework.Xml.Strategy
interceptor SimpleFramework.Xml.Core.Interceptor
strategy Strategy
Résultat SimpleFramework.Xml.Strategy

Read() public méthode

Here we intercept the call to get the element value from the strategy so that we can change the attributes in the XML element to match what was change on writing the element.
public Read ( Type field, NodeMap node, Dictionary map ) : Value
field Type
node NodeMap /// this is the XML element to be modified ///
map Dictionary
Résultat Value

Write() public méthode

Here we change the XML element after it has been annotated by the strategy. In this way we can ensure we write what we want to the resulting XML document.
public Write ( Type field, Object value, NodeMap node, Dictionary map ) : bool
field Type
value Object
node NodeMap /// this is the XML element that will be written ///
map Dictionary
Résultat bool