public void Serialize(MongoDB.Bson.IO.BsonWriter bsonWriter, System.Type nominalType, object value, IBsonSerializationOptions options) { var vector2 = (Vector) value; bsonWriter.WriteStartArray(); bsonWriter.WriteDouble(vector2.X); bsonWriter.WriteDouble(vector2.Y); bsonWriter.WriteEndArray(); }