public BsonWriter(BinaryWriter writer) { ValidationUtils.ArgumentNotNull(writer, nameof(writer)); _writer = new BsonBinaryWriter(writer); }