C# Класс 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.
Наследование: Strategy
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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.

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

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

public Decorator ( SimpleFramework.Xml.Core.Interceptor interceptor, Strategy strategy ) : SimpleFramework.Xml.Strategy
interceptor SimpleFramework.Xml.Core.Interceptor
strategy Strategy
Результат SimpleFramework.Xml.Strategy

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

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
Результат Value

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

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
Результат bool