C# Class 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.
Inheritance: IBusinessObjectXmlReader
Mostrar archivo Open project: Chillisoft/habanero Class Usage Examples

Public Methods

Method Description
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.

Protected Methods

Method Description
SetupProperty ( IBusinessObject bo, string propertyName, string propertyValue ) : void

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

Method Details

Read() public method

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
return IEnumerable

SetupProperty() protected method

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
return void