C# Класс Habanero.BO.BusinessObjectXmlReader

Converts the content of an XmlReader into a set of IBusinessObject. This is the default implementation, and converts xml written by the BusinessObjectXmlWriter into business objects. It's easiest to use this class via ObjectTreeXmlReader or DataStoreInMemoryXmlReader. However, if you need to change how objects are read/written from xml, implement your own IBusinessObjectXmlReader and IBusinessObjectXmlWriter and use them with those classes.
Наследование: IBusinessObjectXmlReader
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Read ( XmlReader xmlReader ) : IEnumerable

Uses the XmlReader given to read an xml stream and instantiates IBusinessObjects for each bo node in the stream. The resultant IEnumerable can only be iterated once, so convert it to a list or array (using ToList() or ToArray()) if you want to iterate through it more than once (this includes using Count() etc). The XmlReader is closed once you have iterated.

Защищенные методы

Метод Описание
SetupProperty ( IBusinessObject bo, string propertyName, string propertyValue ) : void

Sets up a property using InitialiseProp so no rules are checked or events are fired.

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

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

Uses the XmlReader given to read an xml stream and instantiates IBusinessObjects for each bo node in the stream. The resultant IEnumerable can only be iterated once, so convert it to a list or array (using ToList() or ToArray()) if you want to iterate through it more than once (this includes using Count() etc). The XmlReader is closed once you have iterated.
public Read ( XmlReader xmlReader ) : IEnumerable
xmlReader System.Xml.XmlReader The reader to read from
Результат IEnumerable

SetupProperty() защищенный Метод

Sets up a property using InitialiseProp so no rules are checked or events are fired.
protected SetupProperty ( IBusinessObject bo, string propertyName, string propertyValue ) : void
bo IBusinessObject The bo to set the property value on
propertyName string The name of the property to set
propertyValue string The value to set
Результат void