Flush() public method

Flushes any pending data to the output destination.
public Flush ( ) : void
return void
Esempio n. 1
0
 public void TestFlushAndClose()
 {
     var stream = new MemoryStream();
     using (var bsonWriter = new BsonBinaryWriter(stream))
     {
         bsonWriter.WriteStartDocument();
         bsonWriter.WriteEndDocument();
         bsonWriter.Flush();
         bsonWriter.Close();
     }
 }