Habanero.BO.DataStoreInMemoryXmlWriter.Write C# (CSharp) Method

Write() public method

Writes the businessobjects to the writer.
public Write ( XmlWriter writer, IBusinessObject>.IDictionary businessObjects, bool includeStartDocument = true ) : void
writer System.Xml.XmlWriter
businessObjects IBusinessObject>.IDictionary
includeStartDocument bool If true, starts a new xml doc and will close the writer /// after completion. If false, will act as if the write already has a doc started /// (ie, won't add the startdoc element or close the writer). Defaults to true
return void
        public void Write(XmlWriter writer, IDictionary<Guid, IBusinessObject> businessObjects, bool includeStartDocument = true)
        {
            var boWriter = new BusinessObjectXmlWriter();
            boWriter.Write(writer, businessObjects.Values, includeStartDocument);
        }

Same methods

DataStoreInMemoryXmlWriter::Write ( Stream stream, DataStoreInMemory dataStore ) : void
DataStoreInMemoryXmlWriter::Write ( Stream stream, IBusinessObject>.IDictionary businessObjects ) : void
DataStoreInMemoryXmlWriter::Write ( StringBuilder s, DataStoreInMemory dataStore ) : void

Usage Example

コード例 #1
0
 public void Write()
 {
     //---------------Set up test pack-------------------
     var dataStore = new DataStoreInMemory();
     dataStore.Add(new Car());
     var stream = new MemoryStream();
     var writer = new DataStoreInMemoryXmlWriter();
     //---------------Assert Precondition----------------
     Assert.AreEqual(1, dataStore.Count);
     Assert.AreEqual(0, stream.Length);
     //---------------Execute Test ----------------------
     writer.Write(stream, dataStore);
     //---------------Test Result -----------------------
     Assert.AreNotEqual(0, stream.Length);
 }
All Usage Examples Of Habanero.BO.DataStoreInMemoryXmlWriter::Write
DataStoreInMemoryXmlWriter