Close() public method

Closes the writer.
public Close ( ) : void
return void
コード例 #1
0
ファイル: CSharp116Tests.cs プロジェクト: RavenZZ/MDRelation
 public void Test1ChunkPlus1()
 {
     var stream = new MemoryStream();
     using (var bsonWriter = new BsonBinaryWriter(stream))
     {
         bsonWriter.WriteStartDocument();
         bsonWriter.WriteBytes("Data", new byte[16 * 1024 - 15]);
         bsonWriter.WriteEndDocument();
         bsonWriter.Close();
     }
 }
コード例 #2
0
ファイル: CSharp116Tests.cs プロジェクト: RavenZZ/MDRelation
 public void TestFlushAndClose()
 {
     var stream = new MemoryStream();
     using (var bsonWriter = new BsonBinaryWriter(stream))
     {
         bsonWriter.WriteStartDocument();
         bsonWriter.WriteEndDocument();
         bsonWriter.Flush();
         bsonWriter.Close();
     }
 }