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

This class reads an xml stream and loads the objects in it into a DataStoreInMemory The class assumes you are loading afresh. Before doing the load, we recommend that you clear your BusinessObjectManager too so that you only have one instance of each object.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Read ( Stream stream ) : DataStoreInMemory

Reads from a stream that contains xml text. Creates the XmlReader that reads the stream and then uses a default IBusinessObjectXmlReader to create the objects from the xml. Any errors that occur when setting properties on objects will be added to the ReadResult property. Once this method returns, check the Successful flag of the ReadResult to see if there are errors, and check the Message flag to see what the errors were.

Read ( Stream stream, IBusinessObjectXmlReader boReader ) : DataStoreInMemory

Reads from a stream. Uses the given IBusinessObjectXmlReader to create the objects from the xml. Any errors that occur when setting properties on objects will be added to the ReadResult property. Once this method returns, check the Successful flag of the ReadResult to see if there are errors, and check the Message flag to see what the errors were.

Read ( XmlReader xmlReader ) : DataStoreInMemory

Reads from an XmlReader. Uses a default IBusinessObjectXmlReader to create the objects from the xml. Any errors that occur when setting properties on objects will be added to the ReadResult property. Once this method returns, check the Successful flag of the ReadResult to see if there are errors, and check the Message flag to see what the errors were.

Read ( XmlReader xmlReader, IBusinessObjectXmlReader boReader ) : DataStoreInMemory

Reads from a stream. Uses the given IBusinessObjectXmlReader to create the objects from the xml. Any errors that occur when setting properties on objects will be added to the ReadResult property. Once this method returns, check the Successful flag of the ReadResult to see if there are errors, and check the Message flag to see what the errors were.

Read ( string xml ) : DataStoreInMemory

Reads from a string that contains xml text. Creates the XmlReader that reads the string and then uses a default IBusinessObjectXmlReader to create the objects from the xml. Any errors that occur when setting properties on objects will be added to the ReadResult property. Once this method returns, check the Successful flag of the ReadResult to see if there are errors, and check the Message flag to see what the errors were.

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

Метод Описание
ConfigureObjectAfterLoad ( IBusinessObject bo ) : IBusinessObject

Sets up the object after loading. In this case: 1. Sets the status of the object to not new, not dirty, not editing and not deleted. 2. Calls the BusinessObject.AfterLoad() method on the object 3. Backs up the property values, setting the persisted values of the properties

GetSettings ( ) : XmlReaderSettings

Returns the settings for the xml reader. Can be overridden to set your own settings.

Приватные методы

Метод Описание
BuildExceptionMessage ( IEnumerable propertyReadExceptions ) : string

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

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

Sets up the object after loading. In this case: 1. Sets the status of the object to not new, not dirty, not editing and not deleted. 2. Calls the BusinessObject.AfterLoad() method on the object 3. Backs up the property values, setting the persisted values of the properties
protected ConfigureObjectAfterLoad ( IBusinessObject bo ) : IBusinessObject
bo IBusinessObject The object to configure
Результат IBusinessObject

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

Returns the settings for the xml reader. Can be overridden to set your own settings.
protected GetSettings ( ) : XmlReaderSettings
Результат System.Xml.XmlReaderSettings

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

Reads from a stream that contains xml text. Creates the XmlReader that reads the stream and then uses a default IBusinessObjectXmlReader to create the objects from the xml. Any errors that occur when setting properties on objects will be added to the ReadResult property. Once this method returns, check the Successful flag of the ReadResult to see if there are errors, and check the Message flag to see what the errors were.
public Read ( Stream stream ) : DataStoreInMemory
stream Stream The stream to read from. This stream must contain xml text
Результат DataStoreInMemory

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

Reads from a stream. Uses the given IBusinessObjectXmlReader to create the objects from the xml. Any errors that occur when setting properties on objects will be added to the ReadResult property. Once this method returns, check the Successful flag of the ReadResult to see if there are errors, and check the Message flag to see what the errors were.
public Read ( Stream stream, IBusinessObjectXmlReader boReader ) : DataStoreInMemory
stream Stream The stream to read the xml from
boReader IBusinessObjectXmlReader The to use. This object /// converts the xml data into business objects, so you can control how the objects are deserialised by /// creating your own.
Результат DataStoreInMemory

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

Reads from an XmlReader. Uses a default IBusinessObjectXmlReader to create the objects from the xml. Any errors that occur when setting properties on objects will be added to the ReadResult property. Once this method returns, check the Successful flag of the ReadResult to see if there are errors, and check the Message flag to see what the errors were.
public Read ( XmlReader xmlReader ) : DataStoreInMemory
xmlReader XmlReader The reader to use
Результат DataStoreInMemory

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

Reads from a stream. Uses the given IBusinessObjectXmlReader to create the objects from the xml. Any errors that occur when setting properties on objects will be added to the ReadResult property. Once this method returns, check the Successful flag of the ReadResult to see if there are errors, and check the Message flag to see what the errors were.
public Read ( XmlReader xmlReader, IBusinessObjectXmlReader boReader ) : DataStoreInMemory
xmlReader XmlReader The xml reader to use
boReader IBusinessObjectXmlReader The to use. This object /// converts the xml data into business objects, so you can control how the objects are deserialised by /// creating your own.
Результат DataStoreInMemory

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

Reads from a string that contains xml text. Creates the XmlReader that reads the string and then uses a default IBusinessObjectXmlReader to create the objects from the xml. Any errors that occur when setting properties on objects will be added to the ReadResult property. Once this method returns, check the Successful flag of the ReadResult to see if there are errors, and check the Message flag to see what the errors were.
public Read ( string xml ) : DataStoreInMemory
xml string The xml to read
Результат DataStoreInMemory