Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BsonWriter"/> class.
 /// </summary>
 /// <param name="writer">The <see cref="BinaryWriter"/> to write to.</param>
 public BsonWriter(BinaryWriter writer)
 {
     ValidationUtils.ArgumentNotNull(writer, nameof(writer));
     _writer = new BsonBinaryWriter(writer);
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BsonWriter"/> class.
 /// </summary>
 /// <param name="stream">The <see cref="Stream"/> to write to.</param>
 public BsonWriter(Stream stream)
 {
     ValidationUtils.ArgumentNotNull(stream, nameof(stream));
     _writer = new BsonBinaryWriter(new BinaryWriter(stream));
 }