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

Write() public method

Writes the data store's objects to the stream.
public Write ( Stream stream, DataStoreInMemory dataStore ) : void
stream Stream
dataStore DataStoreInMemory
return void
        public void Write(Stream stream, DataStoreInMemory dataStore)
        {
            Write(stream, dataStore.AllObjects);
        }

Same methods

DataStoreInMemoryXmlWriter::Write ( Stream stream, IBusinessObject>.IDictionary businessObjects ) : void
DataStoreInMemoryXmlWriter::Write ( StringBuilder s, DataStoreInMemory dataStore ) : void
DataStoreInMemoryXmlWriter::Write ( XmlWriter writer, IBusinessObject>.IDictionary businessObjects, bool includeStartDocument = true ) : 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